-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* M3: adjust yaru switch style Fixes #197 * Fix FAB color dark, text button theme dark, tabbar dark * Fix indicator * improve tabbbartheme * Fix icon theme and dropdown menu * Move fab color to fab theme * fix icon buttons * add inputtheme to menu * Add tonal button theme * Correct method and remove tonal it's for us the same as filled * Add navigationbartheme * Add navi rail theme and divider theme * fix navi rail theme * Fix checkbox contrast * Fix switches * add badge theme * lighter check border
- Loading branch information
1 parent
cdb7478
commit 093617b
Showing
4 changed files
with
459 additions
and
175 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,78 +1,96 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
const textTheme = TextTheme( | ||
displayLarge: _UbuntuTextStyle( | ||
fontSize: 96, | ||
letterSpacing: -1.5, | ||
fontWeight: FontWeight.w300, | ||
), | ||
displayMedium: _UbuntuTextStyle( | ||
fontSize: 60, | ||
letterSpacing: -0.5, | ||
fontWeight: FontWeight.w300, | ||
), | ||
displaySmall: _UbuntuTextStyle( | ||
fontSize: 48, | ||
fontWeight: FontWeight.normal, | ||
), | ||
headlineMedium: _UbuntuTextStyle( | ||
fontSize: 34, | ||
fontWeight: FontWeight.normal, | ||
), | ||
headlineSmall: _UbuntuTextStyle( | ||
fontSize: 24, | ||
letterSpacing: -0.18, | ||
fontWeight: FontWeight.normal, | ||
), | ||
titleLarge: _UbuntuTextStyle( | ||
fontSize: 20, | ||
letterSpacing: 0.15, | ||
fontWeight: FontWeight.w500, | ||
), | ||
titleMedium: _UbuntuTextStyle( | ||
fontSize: 16, | ||
letterSpacing: 0.15, | ||
fontWeight: FontWeight.normal, | ||
), | ||
titleSmall: _UbuntuTextStyle( | ||
fontSize: 14, | ||
letterSpacing: 0.1, | ||
fontWeight: FontWeight.w500, | ||
), | ||
bodyLarge: _UbuntuTextStyle( | ||
fontSize: 16, | ||
letterSpacing: 0.5, | ||
fontWeight: FontWeight.normal, | ||
), | ||
bodyMedium: _UbuntuTextStyle( | ||
fontSize: 14, | ||
letterSpacing: 0.25, | ||
fontWeight: FontWeight.normal, | ||
), | ||
labelLarge: _UbuntuTextStyle( | ||
fontSize: 14, | ||
letterSpacing: 0.25, | ||
fontWeight: FontWeight.w500, | ||
), | ||
bodySmall: _UbuntuTextStyle( | ||
fontSize: 12, | ||
letterSpacing: 0.4, | ||
fontWeight: FontWeight.normal, | ||
), | ||
labelSmall: _UbuntuTextStyle( | ||
fontSize: 10, | ||
letterSpacing: 1.5, | ||
fontWeight: FontWeight.normal, | ||
), | ||
); | ||
TextTheme createTextTheme(Color textColor) { | ||
return TextTheme( | ||
displayLarge: _UbuntuTextStyle( | ||
fontSize: 96, | ||
letterSpacing: -1.5, | ||
fontWeight: FontWeight.w300, | ||
textColor: textColor, | ||
), | ||
displayMedium: _UbuntuTextStyle( | ||
fontSize: 60, | ||
letterSpacing: -0.5, | ||
fontWeight: FontWeight.w300, | ||
textColor: textColor, | ||
), | ||
displaySmall: _UbuntuTextStyle( | ||
fontSize: 48, | ||
fontWeight: FontWeight.normal, | ||
textColor: textColor, | ||
), | ||
headlineMedium: _UbuntuTextStyle( | ||
fontSize: 34, | ||
fontWeight: FontWeight.normal, | ||
textColor: textColor, | ||
), | ||
headlineSmall: _UbuntuTextStyle( | ||
fontSize: 24, | ||
letterSpacing: -0.18, | ||
fontWeight: FontWeight.normal, | ||
textColor: textColor, | ||
), | ||
titleLarge: _UbuntuTextStyle( | ||
fontSize: 20, | ||
letterSpacing: 0.15, | ||
fontWeight: FontWeight.w500, | ||
textColor: textColor, | ||
), | ||
titleMedium: _UbuntuTextStyle( | ||
fontSize: 16, | ||
letterSpacing: 0.15, | ||
fontWeight: FontWeight.normal, | ||
textColor: textColor, | ||
), | ||
titleSmall: _UbuntuTextStyle( | ||
fontSize: 14, | ||
letterSpacing: 0.1, | ||
fontWeight: FontWeight.w500, | ||
textColor: textColor, | ||
), | ||
bodyLarge: _UbuntuTextStyle( | ||
fontSize: 16, | ||
letterSpacing: 0.5, | ||
fontWeight: FontWeight.normal, | ||
textColor: textColor, | ||
), | ||
bodyMedium: _UbuntuTextStyle( | ||
fontSize: 14, | ||
letterSpacing: 0.25, | ||
fontWeight: FontWeight.normal, | ||
textColor: textColor, | ||
), | ||
labelLarge: _UbuntuTextStyle( | ||
fontSize: 14, | ||
letterSpacing: 0.25, | ||
fontWeight: FontWeight.w500, | ||
textColor: textColor, | ||
), | ||
bodySmall: _UbuntuTextStyle( | ||
fontSize: 12, | ||
letterSpacing: 0.4, | ||
fontWeight: FontWeight.normal, | ||
textColor: textColor, | ||
), | ||
labelSmall: _UbuntuTextStyle( | ||
fontSize: 10, | ||
letterSpacing: 1.5, | ||
fontWeight: FontWeight.normal, | ||
textColor: textColor, | ||
), | ||
); | ||
} | ||
|
||
class _UbuntuTextStyle extends TextStyle { | ||
final Color textColor; | ||
const _UbuntuTextStyle({ | ||
super.fontSize, | ||
super.letterSpacing, | ||
super.fontWeight, | ||
required this.textColor, | ||
}) : super( | ||
fontFamily: 'Ubuntu', | ||
package: 'yaru', | ||
color: textColor, | ||
); | ||
} |
Oops, something went wrong.