Cw 373 theme refactoring in preparation to support additional themes (#933)

* refactor(Theme): migrate accentColor

- based on the specs at https://docs.flutter.dev/release/breaking-changes/theme-data-accent-properties#migration-guide.

* refactor(Theme): all deprecated TextTheme styles

* refactor(Theme): deprecated backgroundColor for colorScheme.background

* refactor(Theme): deprecated buttonColor to use TextTheme backgroundColor instead

* refactor(Theme): deprecated isAlwaysShown to use thumbVisibility instead
This commit is contained in:
Rafael Saes
2023-05-25 02:19:51 +03:00
committed by GitHub
parent c835059d13
commit baabc0a915
141 changed files with 1954 additions and 1111 deletions
+10 -3
View File
@@ -19,7 +19,8 @@ class AddTemplateButton extends StatelessWidget {
child: DottedBorder(
borderType: BorderType.RRect,
dashPattern: [6, 4],
color: Theme.of(context).primaryTextTheme.headline3!.decorationColor!,
color:
Theme.of(context).primaryTextTheme!.displaySmall!.decorationColor!,
strokeWidth: 2,
radius: Radius.circular(20),
child: Container(
@@ -34,14 +35,20 @@ class AddTemplateButton extends StatelessWidget {
child: currentTemplatesLength >= 1
? Icon(
Icons.add,
color: Theme.of(context).primaryTextTheme.headline2!.color!,
color: Theme.of(context)
.primaryTextTheme!
.displayMedium!
.color!,
)
: Text(
S.of(context).new_template,
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w600,
color: Theme.of(context).primaryTextTheme.headline2!.color!,
color: Theme.of(context)
.primaryTextTheme!
.displayMedium!
.color!,
),
),
),
+12 -7
View File
@@ -68,7 +68,7 @@ class AddressTextField extends StatelessWidget {
style: textStyle ??
TextStyle(
fontSize: 16,
color: Theme.of(context).primaryTextTheme.headline6!.color!),
color: Theme.of(context).primaryTextTheme!.titleLarge!.color!),
decoration: InputDecoration(
suffixIcon: SizedBox(
width: prefixIconWidth * options.length +
@@ -121,7 +121,8 @@ class AddressTextField extends StatelessWidget {
decoration: BoxDecoration(
color: buttonColor ??
Theme.of(context)
.accentTextTheme.headline6!
.accentTextTheme!
.titleLarge!
.color!,
borderRadius:
BorderRadius.all(Radius.circular(6))),
@@ -129,7 +130,8 @@ class AddressTextField extends StatelessWidget {
'assets/images/paste_ios.png',
color: iconColor ??
Theme.of(context)
.primaryTextTheme.headline4!
.primaryTextTheme!
.headlineMedium!
.decorationColor!,
)),
)),
@@ -147,7 +149,8 @@ class AddressTextField extends StatelessWidget {
decoration: BoxDecoration(
color: buttonColor ??
Theme.of(context)
.accentTextTheme.headline6!
.accentTextTheme
.titleLarge!
.color!,
borderRadius:
BorderRadius.all(Radius.circular(6))),
@@ -155,7 +158,7 @@ class AddressTextField extends StatelessWidget {
'assets/images/qr_code_icon.png',
color: iconColor ??
Theme.of(context)
.primaryTextTheme.headline4!
.primaryTextTheme!.headlineMedium!
.decorationColor!,
)),
))
@@ -174,7 +177,8 @@ class AddressTextField extends StatelessWidget {
decoration: BoxDecoration(
color: buttonColor ??
Theme.of(context)
.accentTextTheme.headline6!
.accentTextTheme!
.titleLarge!
.color!,
borderRadius:
BorderRadius.all(Radius.circular(6))),
@@ -182,7 +186,8 @@ class AddressTextField extends StatelessWidget {
'assets/images/open_book.png',
color: iconColor ??
Theme.of(context)
.primaryTextTheme.headline4!
.primaryTextTheme!
.headlineMedium!
.decorationColor!,
)),
))
+7 -2
View File
@@ -31,7 +31,10 @@ class AlertWithOneAction extends BaseAlertDialog {
width: 300,
height: 52,
padding: EdgeInsets.only(left: 12, right: 12),
color: Theme.of(context).accentTextTheme!.bodyText2!.backgroundColor!,
color: Theme.of(context)
.accentTextTheme!
.bodyMedium!
.backgroundColor!,
child: ButtonTheme(
minWidth: double.infinity,
child: TextButton(
@@ -45,7 +48,9 @@ class AlertWithOneAction extends BaseAlertDialog {
style: TextStyle(
fontSize: 15,
fontWeight: FontWeight.w600,
color: Theme.of(context).primaryTextTheme!.bodyText2!
color: Theme.of(context)
.primaryTextTheme!
.bodyMedium!
.backgroundColor!,
decoration: TextDecoration.none,
),
+16 -9
View File
@@ -25,7 +25,7 @@ class BaseAlertDialog extends StatelessWidget {
fontSize: 20,
fontFamily: 'Lato',
fontWeight: FontWeight.w600,
color: Theme.of(context).primaryTextTheme!.headline6!.color!,
color: Theme.of(context).primaryTextTheme!.titleLarge!.color!,
decoration: TextDecoration.none,
),
);
@@ -39,7 +39,7 @@ class BaseAlertDialog extends StatelessWidget {
fontSize: 16,
fontWeight: FontWeight.normal,
fontFamily: 'Lato',
color: Theme.of(context).primaryTextTheme!.headline6!.color!,
color: Theme.of(context).primaryTextTheme!.titleLarge!.color!,
decoration: TextDecoration.none,
),
);
@@ -59,7 +59,7 @@ class BaseAlertDialog extends StatelessWidget {
backgroundColor: leftActionButtonColor ??
Theme.of(context)
.accentTextTheme!
.bodyText1!
.bodyLarge!
.decorationColor!,
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.zero))),
@@ -71,8 +71,10 @@ class BaseAlertDialog extends StatelessWidget {
fontFamily: 'Lato',
fontWeight: FontWeight.w600,
color: leftActionButtonTextColor ??
Theme.of(context).primaryTextTheme!
.bodyText1!.backgroundColor!,
Theme.of(context)
.primaryTextTheme!
.bodyLarge!
.backgroundColor!,
decoration: TextDecoration.none,
),
)),
@@ -83,8 +85,10 @@ class BaseAlertDialog extends StatelessWidget {
onPressed: actionRight,
style: TextButton.styleFrom(
backgroundColor: rightActionButtonColor ??
Theme.of(context).accentTextTheme!
.bodyText2!.backgroundColor!,
Theme.of(context)
.accentTextTheme!
.bodyMedium!
.backgroundColor!,
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.zero))),
child: Text(
@@ -97,7 +101,7 @@ class BaseAlertDialog extends StatelessWidget {
color: rightActionButtonTextColor ??
Theme.of(context)
.primaryTextTheme!
.bodyText2!
.bodyMedium!
.backgroundColor!,
decoration: TextDecoration.none,
),
@@ -124,7 +128,10 @@ class BaseAlertDialog extends StatelessWidget {
borderRadius: BorderRadius.all(Radius.circular(30)),
child: Container(
width: 300,
color: Theme.of(context).accentTextTheme!.headline6!.decorationColor!,
color: Theme.of(context)
.accentTextTheme!
.titleLarge!
.decorationColor!,
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
+14 -5
View File
@@ -77,8 +77,8 @@ class BaseTextFormField extends StatelessWidget {
style: textStyle ??
TextStyle(
fontSize: 16.0,
color:
textColor ?? Theme.of(context).primaryTextTheme.headline6!.color!),
color: textColor ??
Theme.of(context).primaryTextTheme!.titleLarge!.color!),
decoration: InputDecoration(
prefix: prefix,
prefixIcon: prefixIcon,
@@ -92,17 +92,26 @@ class BaseTextFormField extends StatelessWidget {
focusedBorder: UnderlineInputBorder(
borderSide: BorderSide(
color: borderColor ??
Theme.of(context).primaryTextTheme.headline6!.backgroundColor!,
Theme.of(context)
.primaryTextTheme!
.titleLarge!
.backgroundColor!,
width: borderWidth)),
disabledBorder: UnderlineInputBorder(
borderSide: BorderSide(
color: borderColor ??
Theme.of(context).primaryTextTheme.headline6!.backgroundColor!,
Theme.of(context)
.primaryTextTheme!
.titleLarge!
.backgroundColor!,
width: borderWidth)),
enabledBorder: UnderlineInputBorder(
borderSide: BorderSide(
color: borderColor ??
Theme.of(context).primaryTextTheme.headline6!.backgroundColor!,
Theme.of(context)
.primaryTextTheme!
.titleLarge!
.backgroundColor!,
width: borderWidth))),
validator: validator,
);
@@ -80,7 +80,8 @@ class BlockchainHeightState extends State<BlockchainHeightWidget> {
style: TextStyle(
fontSize: 16.0,
fontWeight: FontWeight.w500,
color: Theme.of(context).primaryTextTheme!.headline6!.color!),
color:
Theme.of(context).primaryTextTheme!.titleLarge!.color!),
),
),
Row(
+4 -2
View File
@@ -27,7 +27,8 @@ class CakeScrollbar extends StatelessWidget {
height: backgroundHeight,
width: width,
decoration: BoxDecoration(
color: backgroundColor ?? Theme.of(context).textTheme!.bodyText2!.decorationColor!,
color: backgroundColor ??
Theme.of(context).textTheme!.bodyMedium!.decorationColor!,
borderRadius: BorderRadius.all(Radius.circular(3))),
child: Stack(
children: <Widget>[
@@ -38,7 +39,8 @@ class CakeScrollbar extends StatelessWidget {
height: thumbHeight,
width: width,
decoration: BoxDecoration(
color: thumbColor ?? Theme.of(context).textTheme!.bodyText2!.color!,
color: thumbColor ??
Theme.of(context).textTheme!.bodyMedium!.color!,
borderRadius: BorderRadius.all(Radius.circular(3))),
),
)
+19 -7
View File
@@ -53,7 +53,10 @@ class CheckBoxPickerState extends State<CheckBoxPicker> {
child: ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(30)),
child: Container(
color: Theme.of(context).accentTextTheme.headline6!.color!,
color: Theme.of(context)
.accentTextTheme!
.titleLarge!
.color!,
child: ConstrainedBox(
constraints: BoxConstraints(
maxHeight: MediaQuery.of(context).size.height * 0.65,
@@ -87,7 +90,10 @@ class CheckBoxPickerState extends State<CheckBoxPicker> {
Widget itemsList() {
return Container(
color: Theme.of(context).accentTextTheme.headline6!.backgroundColor!,
color: Theme.of(context)
.accentTextTheme!
.titleLarge!
.backgroundColor!,
child: ListView.separated(
padding: EdgeInsets.zero,
controller: controller,
@@ -95,8 +101,8 @@ class CheckBoxPickerState extends State<CheckBoxPicker> {
separatorBuilder: (context, index) => widget.isSeparated
? Divider(
color: Theme.of(context)
.accentTextTheme
.headline6!
.accentTextTheme!
.titleLarge!
.backgroundColor!,
height: 1,
)
@@ -116,13 +122,19 @@ class CheckBoxPickerState extends State<CheckBoxPicker> {
},
child: Container(
height: 55,
color: Theme.of(context).accentTextTheme.headline6!.color!,
color: Theme.of(context)
.accentTextTheme!
.titleLarge!
.color!,
padding: EdgeInsets.only(left: 24, right: 24),
child: CheckboxListTile(
value: item.value,
activeColor: item.value
? Palette.blueCraiola
: Theme.of(context).accentTextTheme.subtitle1!.decorationColor!,
: Theme.of(context)
.accentTextTheme!
.titleMedium!
.decorationColor!,
checkColor: Colors.white,
title: widget.displayItem?.call(item) ??
Text(
@@ -133,7 +145,7 @@ class CheckBoxPickerState extends State<CheckBoxPicker> {
fontWeight: FontWeight.w600,
color: item.isDisabled
? Colors.grey.withOpacity(0.5)
: Theme.of(context).primaryTextTheme.headline6!.color!,
: Theme.of(context).primaryTextTheme!.titleLarge!.color!,
decoration: TextDecoration.none,
),
),
+10 -6
View File
@@ -42,15 +42,19 @@ class CheckboxWidgetState extends State<CheckboxWidget> {
decoration: BoxDecoration(
color: value
? Palette.blueCraiola
: Theme.of(context).accentTextTheme!.subtitle1!.decorationColor!,
: Theme.of(context)
.accentTextTheme!
.titleMedium!
.decorationColor!,
borderRadius: BorderRadius.all(Radius.circular(2)),
border: Border.all(
color: value
? Palette.blueCraiola
: Theme.of(context).accentTextTheme!.overline!.color!,
width: 1
)
),
: Theme.of(context)
.accentTextTheme!
.labelSmall!
.color!,
width: 1)),
child: value
? Center(
child: Icon(
@@ -66,7 +70,7 @@ class CheckboxWidgetState extends State<CheckboxWidget> {
child: Text(
caption,
style: TextStyle(
color: Theme.of(context).primaryTextTheme!.headline6!.color!,
color: Theme.of(context).primaryTextTheme!.titleLarge!.color!,
fontSize: 18,
fontFamily: 'Lato',
fontWeight: FontWeight.w500,
@@ -38,7 +38,7 @@ class CollapsibleSectionList extends SectionStandardList {
items.add(Theme(
data: ThemeData(
textTheme: TextTheme(subtitle1: TextStyle(color: themeColor,fontFamily: 'Lato')),
textTheme: TextTheme(titleMedium: TextStyle(color: themeColor,fontFamily: 'Lato')),
backgroundColor: dividerThemeColor,
unselectedWidgetColor: themeColor,
accentColor: themeColor)
+3 -3
View File
@@ -26,7 +26,7 @@ class IntroducingCard extends StatelessWidget {
color: borderColor,
width: 1,
),
color: Theme.of(context).textTheme!.headline6!.backgroundColor!),
color: Theme.of(context).textTheme!.titleLarge!.backgroundColor!),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
@@ -46,7 +46,7 @@ class IntroducingCard extends StatelessWidget {
fontWeight: FontWeight.bold,
color: Theme.of(context)
.accentTextTheme!
.headline2!
.displayMedium!
.backgroundColor!,
height: 1),
maxLines: 1,
@@ -59,7 +59,7 @@ class IntroducingCard extends StatelessWidget {
fontFamily: 'Lato',
color: Theme.of(context)
.accentTextTheme!
.headline2!
.displayMedium!
.backgroundColor!,
height: 1)),
],
+6 -4
View File
@@ -19,7 +19,7 @@ class ListRow extends StatelessWidget {
Widget build(BuildContext context) {
return Container(
width: double.infinity,
color: Theme.of(context).backgroundColor,
color: Theme.of(context).colorScheme.background,
child: Padding(
padding:
const EdgeInsets.only(left: 24, top: 16, bottom: 16, right: 24),
@@ -30,8 +30,10 @@ class ListRow extends StatelessWidget {
style: TextStyle(
fontSize: titleFontSize,
fontWeight: FontWeight.w500,
color:
Theme.of(context).primaryTextTheme!.overline!.color!),
color: Theme.of(context)
.primaryTextTheme!
.labelSmall!
.color!),
textAlign: TextAlign.left),
Padding(
padding: const EdgeInsets.only(top: 12),
@@ -47,7 +49,7 @@ class ListRow extends StatelessWidget {
fontWeight: FontWeight.w500,
color: Theme.of(context)
.primaryTextTheme!
.headline6!
.titleLarge!
.color!)),
),
image != null
+3 -3
View File
@@ -26,7 +26,7 @@ class MarketPlaceItem extends StatelessWidget {
padding: EdgeInsets.all(20),
width: double.infinity,
decoration: BoxDecoration(
color: Theme.of(context).textTheme!.headline6!.backgroundColor!,
color: Theme.of(context).textTheme!.titleLarge!.backgroundColor!,
borderRadius: BorderRadius.circular(20),
border: Border.all(
color: Colors.white.withOpacity(0.20),
@@ -41,7 +41,7 @@ class MarketPlaceItem extends StatelessWidget {
style: TextStyle(
color: Theme.of(context)
.accentTextTheme!
.headline2!
.displayMedium!
.backgroundColor!,
fontSize: 24,
fontWeight: FontWeight.w900,
@@ -53,7 +53,7 @@ class MarketPlaceItem extends StatelessWidget {
style: TextStyle(
color: Theme.of(context)
.accentTextTheme!
.headline2!
.displayMedium!
.backgroundColor!,
fontWeight: FontWeight.w500,
fontFamily: 'Lato'),
+42 -27
View File
@@ -143,7 +143,10 @@ class _PickerState<Item> extends State<Picker<Item>> {
child: ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(30)),
child: Container(
color: Theme.of(context).accentTextTheme.headline6!.color!,
color: Theme.of(context)
.accentTextTheme!
.titleLarge!
.color!,
child: ConstrainedBox(
constraints: BoxConstraints(
maxHeight: containerHeight,
@@ -159,8 +162,8 @@ class _PickerState<Item> extends State<Picker<Item>> {
controller: searchController,
style: TextStyle(
color: Theme.of(context)
.primaryTextTheme
.headline6!
.primaryTextTheme!
.titleLarge!
.color!),
decoration: InputDecoration(
hintText: widget.hintText,
@@ -168,8 +171,8 @@ class _PickerState<Item> extends State<Picker<Item>> {
Image.asset("assets/images/search_icon.png"),
filled: true,
fillColor: Theme.of(context)
.accentTextTheme
.headline3!
.accentTextTheme!
.displaySmall!
.color!,
alignLabelWithHint: false,
contentPadding: const EdgeInsets.symmetric(
@@ -189,8 +192,8 @@ class _PickerState<Item> extends State<Picker<Item>> {
),
Divider(
color: Theme.of(context)
.accentTextTheme
.headline6!
.accentTextTheme!
.titleLarge!
.backgroundColor!,
height: 1,
),
@@ -220,8 +223,8 @@ class _PickerState<Item> extends State<Picker<Item>> {
fontFamily: 'Lato',
decoration: TextDecoration.none,
color: Theme.of(context)
.primaryTextTheme
.headline6!
.primaryTextTheme!
.titleLarge!
.color!,
),
),
@@ -242,7 +245,10 @@ class _PickerState<Item> extends State<Picker<Item>> {
Widget itemsList() {
return Container(
color: Theme.of(context).accentTextTheme.headline6!.backgroundColor!,
color: Theme.of(context)
.accentTextTheme!
.titleLarge!
.backgroundColor!,
child: widget.isGridView
? GridView.builder(
padding: EdgeInsets.zero,
@@ -263,8 +269,8 @@ class _PickerState<Item> extends State<Picker<Item>> {
separatorBuilder: (context, index) => widget.isSeparated
? Divider(
color: Theme.of(context)
.accentTextTheme
.headline6!
.accentTextTheme!
.titleLarge!
.backgroundColor!,
height: 1,
)
@@ -296,7 +302,10 @@ class _PickerState<Item> extends State<Picker<Item>> {
},
child: Container(
height: 55,
color: Theme.of(context).accentTextTheme.headline6!.color!,
color: Theme.of(context)
.accentTextTheme!
.titleLarge!
.color!,
padding: EdgeInsets.symmetric(horizontal: 24),
child: Row(
mainAxisSize: MainAxisSize.max,
@@ -318,8 +327,8 @@ class _PickerState<Item> extends State<Picker<Item>> {
fontFamily: 'Lato',
fontWeight: FontWeight.w600,
color: Theme.of(context)
.primaryTextTheme
.headline6!
.primaryTextTheme!
.titleLarge!
.color!,
decoration: TextDecoration.none,
),
@@ -338,8 +347,8 @@ class _PickerState<Item> extends State<Picker<Item>> {
fontSize: 7.0,
fontFamily: 'Lato',
color: Theme.of(context)
.textTheme
.bodyText2!
.textTheme!
.bodyMedium!
.color!),
),
),
@@ -347,8 +356,8 @@ class _PickerState<Item> extends State<Picker<Item>> {
borderRadius: BorderRadius.circular(6.0),
//border: Border.all(color: ),
color: Theme.of(context)
.textTheme
.bodyText2!
.textTheme!
.bodyMedium!
.decorationColor!,
),
),
@@ -383,7 +392,10 @@ class _PickerState<Item> extends State<Picker<Item>> {
},
child: Container(
height: 55,
color: Theme.of(context).accentTextTheme.headline6!.color!,
color: Theme.of(context)
.accentTextTheme!
.titleLarge!
.color!,
padding: EdgeInsets.symmetric(horizontal: 24),
child: Row(
mainAxisSize: MainAxisSize.max,
@@ -405,8 +417,8 @@ class _PickerState<Item> extends State<Picker<Item>> {
fontFamily: 'Lato',
fontWeight: FontWeight.w700,
color: Theme.of(context)
.primaryTextTheme
.headline6!
.primaryTextTheme!
.titleLarge!
.color!,
decoration: TextDecoration.none,
),
@@ -425,8 +437,8 @@ class _PickerState<Item> extends State<Picker<Item>> {
fontSize: 7.0,
fontFamily: 'Lato',
color: Theme.of(context)
.textTheme
.bodyText2!
.textTheme!
.bodyMedium!
.color!),
),
),
@@ -434,8 +446,8 @@ class _PickerState<Item> extends State<Picker<Item>> {
borderRadius: BorderRadius.circular(6.0),
//border: Border.all(color: ),
color: Theme.of(context)
.textTheme
.bodyText2!
.textTheme!
.bodyMedium!
.decorationColor!,
),
),
@@ -445,7 +457,10 @@ class _PickerState<Item> extends State<Picker<Item>> {
),
),
Icon(Icons.check_circle,
color: Theme.of(context).accentTextTheme.bodyText1!.color!),
color: Theme.of(context)
.accentTextTheme!
.bodyLarge!
.color!),
],
),
),
+13 -4
View File
@@ -89,7 +89,10 @@ class SeedWidgetState extends State<SeedWidget> {
cursorColor: Colors.blue,
backgroundCursorColor: Colors.blue,
validStyle: TextStyle(
color: Theme.of(context).primaryTextTheme!.headline6!.color!,
color: Theme.of(context)
.primaryTextTheme!
.titleLarge!
.color!,
backgroundColor: Colors.transparent,
fontWeight: FontWeight.normal,
fontSize: 16),
@@ -102,7 +105,10 @@ class SeedWidgetState extends State<SeedWidget> {
controller: controller,
words: words,
textStyle: TextStyle(
color: Theme.of(context).primaryTextTheme!.headline6!.color!,
color: Theme.of(context)
.primaryTextTheme!
.titleLarge!
.color!,
backgroundColor: Colors.transparent,
fontWeight: FontWeight.normal,
fontSize: 16),
@@ -124,14 +130,17 @@ class SeedWidgetState extends State<SeedWidget> {
child: Image.asset('assets/images/paste_ios.png',
color: Theme.of(context)
.primaryTextTheme!
.headline4!
.headlineMedium!
.decorationColor!)),
)))
]),
Container(
margin: EdgeInsets.only(top: 15),
height: 1.0,
color: Theme.of(context).primaryTextTheme!.headline6!.backgroundColor!),
color: Theme.of(context)
.primaryTextTheme!
.titleLarge!
.backgroundColor!),
]));
}
+2 -2
View File
@@ -29,10 +29,10 @@ class SettingActionButton extends StatelessWidget {
@override
Widget build(BuildContext context) {
Color? color = isSelected
? Theme.of(context).textTheme.headline3!.color
? Theme.of(context).textTheme!.displaySmall!.color
: selectionActive
? Palette.darkBlue
: Theme.of(context).textTheme.headline3!.color;
: Theme.of(context).textTheme!.displaySmall!.color;
return InkWell(
onTap: onTap,
hoverColor: Colors.transparent,
+4 -4
View File
@@ -21,12 +21,12 @@ class StandardCheckbox extends StatelessWidget {
@override
Widget build(BuildContext context) {
final baseGradient = LinearGradient(colors: [
Theme.of(context).primaryTextTheme.subtitle1!.color!,
Theme.of(context).primaryTextTheme.subtitle1!.decorationColor!,
Theme.of(context).primaryTextTheme!.titleMedium!.color!,
Theme.of(context).primaryTextTheme!.titleMedium!.decorationColor!,
], begin: Alignment.centerLeft, end: Alignment.centerRight);
final boxBorder = Border.all(
color: borderColor ?? Theme.of(context).primaryTextTheme.caption!.color!, width: 1.0);
color: borderColor ?? Theme.of(context).primaryTextTheme!.bodySmall!.color!, width: 1.0);
final checkedBoxDecoration = BoxDecoration(
gradient: gradientBackground ? baseGradient : null,
@@ -60,7 +60,7 @@ class StandardCheckbox extends StatelessWidget {
child: Text(
caption,
style: TextStyle(
fontSize: 16.0, color: Theme.of(context).primaryTextTheme!.headline6!.color!),
fontSize: 16.0, color: Theme.of(context).primaryTextTheme!.titleLarge!.color!),
))
],
),
+8 -6
View File
@@ -54,10 +54,10 @@ class StandardListRow extends StatelessWidget {
Color titleColor(BuildContext context) => isSelected
? Palette.blueCraiola
: Theme.of(context).primaryTextTheme!.headline6!.color!;
: Theme.of(context).primaryTextTheme!.titleLarge!.color!;
Color _backgroundColor(BuildContext context) {
return Theme.of(context).backgroundColor;
return Theme.of(context).colorScheme.background;
}
}
@@ -68,7 +68,7 @@ class SectionHeaderListRow extends StatelessWidget {
Container(
width: double.infinity,
height: 40,
color: Theme.of(context).backgroundColor),
color: Theme.of(context).colorScheme.background),
//StandardListSeparator(padding: EdgeInsets.only(left: 24))
]);
}
@@ -85,11 +85,13 @@ class StandardListSeparator extends StatelessWidget {
return Container(
height: height,
padding: padding,
color: Theme.of(context).backgroundColor,
color: Theme.of(context).colorScheme.background,
child: Container(
height: height,
color: Theme.of(context).primaryTextTheme.headline6?.backgroundColor
));
color: Theme.of(context)
.primaryTextTheme!
.titleLarge
?.backgroundColor));
}
}
+2 -2
View File
@@ -21,8 +21,8 @@ class TradeDetailsStandardListCard extends StatelessWidget {
final darkTheme = currentTheme == ThemeType.dark;
final baseGradient = LinearGradient(colors: [
Theme.of(context).primaryTextTheme!.subtitle2!.color!,
Theme.of(context).primaryTextTheme!.subtitle2!.decorationColor!,
Theme.of(context).primaryTextTheme!.titleSmall!.color!,
Theme.of(context).primaryTextTheme!.titleSmall!.decorationColor!,
], begin: Alignment.centerLeft, end: Alignment.centerRight);
final gradient = LinearGradient(colors: [
@@ -13,7 +13,7 @@ class StandardListStatusRow extends StatelessWidget {
Widget build(BuildContext context) {
return Container(
width: double.infinity,
color: Theme.of(context).backgroundColor,
color: Theme.of(context).colorScheme.background,
child: Padding(
padding:
const EdgeInsets.only(left: 24, top: 16, bottom: 16, right: 24),
@@ -24,13 +24,13 @@ class StandardListStatusRow extends StatelessWidget {
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w500,
color: Theme.of(context).primaryTextTheme!.overline!.color!),
color: Theme.of(context).primaryTextTheme!.labelSmall!.color!),
textAlign: TextAlign.left),
Padding(
padding: const EdgeInsets.only(top: 12),
child: Container(
decoration: BoxDecoration(
color: Theme.of(context).accentTextTheme!.headline3!.color!,
color: Theme.of(context).accentTextTheme!.displaySmall!.color!,
borderRadius: BorderRadius.circular(30.0),
),
child: Padding(
@@ -52,7 +52,7 @@ class StandardListStatusRow extends StatelessWidget {
fontWeight: FontWeight.w500,
color: Theme.of(context)
.primaryTextTheme!
.headline6!
.titleLarge!
.color!))
],
),
+8 -2
View File
@@ -24,8 +24,14 @@ class StandardSwitchState extends State<StandardSwitch> {
height: 28,
decoration: BoxDecoration(
color: widget.value
? Theme.of(context).accentTextTheme!.bodyText1!.color!
: Theme.of(context).accentTextTheme!.headline1!.color!,
? Theme.of(context)
.accentTextTheme!
.bodyLarge!
.color!
: Theme.of(context)
.accentTextTheme!
.displayLarge!
.color!,
borderRadius: BorderRadius.all(Radius.circular(14.0))),
child: Container(
width: 24.0,
+2 -2
View File
@@ -47,7 +47,7 @@ class TemplateTileState extends State<TemplateTile> {
@override
Widget build(BuildContext context) {
final color = isRemovable ? Colors.white : Theme.of(context).primaryTextTheme!.headline6!.color!;
final color = isRemovable ? Colors.white : Theme.of(context).primaryTextTheme!.titleLarge!.color!;
final toIcon = Image.asset('assets/images/to_icon.png', color: color);
final content = Row(
@@ -105,7 +105,7 @@ class TemplateTileState extends State<TemplateTile> {
child: Container(
height: 40,
padding: EdgeInsets.only(left: 24, right: 24),
color: Theme.of(context).primaryTextTheme!.headline2!.decorationColor!,
color: Theme.of(context).primaryTextTheme!.displayMedium!.decorationColor!,
child: content,
),
),
+4 -1
View File
@@ -24,7 +24,10 @@ class TrailButton extends StatelessWidget {
caption,
style: TextStyle(
color: textColor ??
Theme.of(context).accentTextTheme!.headline1!.decorationColor!,
Theme.of(context)
.accentTextTheme!
.displayLarge!
.decorationColor!,
fontWeight: FontWeight.w600,
fontSize: 14),
),