refactor: accentTextTheme.titleLarge.color -> dialogTheme.backgroundColor

This commit is contained in:
Rafael Saes 2023-07-03 09:17:47 -03:00
parent d0a872b1d2
commit f9abd0b2c2
9 changed files with 20 additions and 45 deletions

View file

@ -20,10 +20,7 @@ class PickerItemWidget extends StatelessWidget {
return GestureDetector(
onTap: onTap,
child: Container(
color: Theme.of(context)
.accentTextTheme!
.titleLarge!
.color!,
color: Theme.of(context).dialogTheme.backgroundColor,
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 8.0, horizontal: 24),
child: Row(

View file

@ -52,10 +52,7 @@ class ExchangeConfirmPage extends BasePage {
.accentTextTheme!
.bodySmall!
.color!),
color: Theme.of(context)
.accentTextTheme!
.titleLarge!
.color!),
color: Theme.of(context).dialogTheme.backgroundColor),
child: Column(
children: <Widget>[
Expanded(

View file

@ -403,7 +403,7 @@ class TipButton extends StatelessWidget {
}
return isSelected
? Theme.of(context).accentTextTheme!.titleLarge!.color!
? Theme.of(context).dialogTheme.backgroundColor!
: Theme.of(context).primaryTextTheme!.titleLarge!.color!;
}
@ -413,7 +413,7 @@ class TipButton extends StatelessWidget {
}
return isSelected
? Theme.of(context).accentTextTheme!.titleLarge!.color!
? Theme.of(context).dialogTheme.backgroundColor!
: Theme.of(context).primaryTextTheme!.labelSmall!.color!;
}

View file

@ -120,10 +120,7 @@ class AddressTextField extends StatelessWidget {
padding: EdgeInsets.all(8),
decoration: BoxDecoration(
color: buttonColor ??
Theme.of(context)
.accentTextTheme!
.titleLarge!
.color!,
Theme.of(context).dialogTheme.backgroundColor,
borderRadius:
BorderRadius.all(Radius.circular(6))),
child: Image.asset(
@ -148,10 +145,7 @@ class AddressTextField extends StatelessWidget {
padding: EdgeInsets.all(8),
decoration: BoxDecoration(
color: buttonColor ??
Theme.of(context)
.accentTextTheme
.titleLarge!
.color!,
Theme.of(context).dialogTheme.backgroundColor,
borderRadius:
BorderRadius.all(Radius.circular(6))),
child: Image.asset(
@ -176,10 +170,7 @@ class AddressTextField extends StatelessWidget {
padding: EdgeInsets.all(8),
decoration: BoxDecoration(
color: buttonColor ??
Theme.of(context)
.accentTextTheme!
.titleLarge!
.color!,
Theme.of(context).dialogTheme.backgroundColor,
borderRadius:
BorderRadius.all(Radius.circular(6))),
child: Image.asset(

View file

@ -53,10 +53,7 @@ class CheckBoxPickerState extends State<CheckBoxPicker> {
child: ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(30)),
child: Container(
color: Theme.of(context)
.accentTextTheme!
.titleLarge!
.color!,
color: Theme.of(context).dialogTheme.backgroundColor,
child: ConstrainedBox(
constraints: BoxConstraints(
maxHeight: MediaQuery.of(context).size.height * 0.65,
@ -122,10 +119,7 @@ class CheckBoxPickerState extends State<CheckBoxPicker> {
},
child: Container(
height: 55,
color: Theme.of(context)
.accentTextTheme!
.titleLarge!
.color!,
color: Theme.of(context).dialogTheme.backgroundColor,
padding: EdgeInsets.only(left: 24, right: 24),
child: CheckboxListTile(
value: item.value,

View file

@ -143,10 +143,7 @@ class _PickerState<Item> extends State<Picker<Item>> {
child: ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(30)),
child: Container(
color: Theme.of(context)
.accentTextTheme!
.titleLarge!
.color!,
color: Theme.of(context).dialogTheme.backgroundColor,
child: ConstrainedBox(
constraints: BoxConstraints(
maxHeight: containerHeight,
@ -302,10 +299,7 @@ class _PickerState<Item> extends State<Picker<Item>> {
},
child: Container(
height: 55,
color: Theme.of(context)
.accentTextTheme!
.titleLarge!
.color!,
color: Theme.of(context).dialogTheme.backgroundColor,
padding: EdgeInsets.symmetric(horizontal: 24),
child: Row(
mainAxisSize: MainAxisSize.max,
@ -392,10 +386,7 @@ class _PickerState<Item> extends State<Picker<Item>> {
},
child: Container(
height: 55,
color: Theme.of(context)
.accentTextTheme!
.titleLarge!
.color!,
color: Theme.of(context).dialogTheme.backgroundColor,
padding: EdgeInsets.symmetric(horizontal: 24),
child: Row(
mainAxisSize: MainAxisSize.max,

View file

@ -189,7 +189,6 @@ class BrightTheme extends LightTheme {
accentTextTheme: TextTheme(
// title -> titleLarge
titleLarge: TextStyle(
color: Colors.white, // picker background
backgroundColor: Palette.periwinkleCraiola, // picker divider
decorationColor: Colors.white // dialog background
),

View file

@ -27,6 +27,10 @@ class DarkTheme extends ThemeBase {
hoverColor: PaletteDark.cyanBlue, // amount hint text (receive page)
dividerColor: PaletteDark.dividerColor,
hintColor: PaletteDark.pigeonBlue, // menu
dialogTheme: super
.themeData
.dialogTheme
.copyWith(backgroundColor: PaletteDark.nightBlue),
textTheme: TextTheme(
// title -> titleLarge
titleLarge: TextStyle(
@ -194,7 +198,6 @@ class DarkTheme extends ThemeBase {
accentTextTheme: TextTheme(
// title -> titleLarge
titleLarge: TextStyle(
color: PaletteDark.nightBlue, // picker background
backgroundColor: PaletteDark.dividerColor, // picker divider
decorationColor: PaletteDark.darkNightBlue // dialog background
),

View file

@ -28,6 +28,10 @@ class LightTheme extends ThemeBase {
hoverColor: Palette.darkBlueCraiola, // amount hint text (receive page)
dividerColor: Palette.paleBlue,
hintColor: Palette.gray,
dialogTheme: super
.themeData
.dialogTheme
.copyWith(backgroundColor: Colors.white),
textTheme: TextTheme(
// title -> titleLarge
titleLarge: TextStyle(
@ -192,7 +196,6 @@ class LightTheme extends ThemeBase {
accentTextTheme: TextTheme(
// title -> headlititleLargene6
titleLarge: TextStyle(
color: Colors.white, // picker background
backgroundColor: Palette.periwinkleCraiola, // picker divider
decorationColor: Colors.white // dialog background
),