mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-23 20:19:25 +00:00
refactor: accentTextTheme.titleLarge.color -> dialogTheme.backgroundColor
This commit is contained in:
parent
d0a872b1d2
commit
f9abd0b2c2
9 changed files with 20 additions and 45 deletions
|
@ -20,10 +20,7 @@ class PickerItemWidget extends StatelessWidget {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: onTap,
|
onTap: onTap,
|
||||||
child: Container(
|
child: Container(
|
||||||
color: Theme.of(context)
|
color: Theme.of(context).dialogTheme.backgroundColor,
|
||||||
.accentTextTheme!
|
|
||||||
.titleLarge!
|
|
||||||
.color!,
|
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.symmetric(vertical: 8.0, horizontal: 24),
|
padding: const EdgeInsets.symmetric(vertical: 8.0, horizontal: 24),
|
||||||
child: Row(
|
child: Row(
|
||||||
|
|
|
@ -52,10 +52,7 @@ class ExchangeConfirmPage extends BasePage {
|
||||||
.accentTextTheme!
|
.accentTextTheme!
|
||||||
.bodySmall!
|
.bodySmall!
|
||||||
.color!),
|
.color!),
|
||||||
color: Theme.of(context)
|
color: Theme.of(context).dialogTheme.backgroundColor),
|
||||||
.accentTextTheme!
|
|
||||||
.titleLarge!
|
|
||||||
.color!),
|
|
||||||
child: Column(
|
child: Column(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Expanded(
|
Expanded(
|
||||||
|
|
|
@ -403,7 +403,7 @@ class TipButton extends StatelessWidget {
|
||||||
}
|
}
|
||||||
|
|
||||||
return isSelected
|
return isSelected
|
||||||
? Theme.of(context).accentTextTheme!.titleLarge!.color!
|
? Theme.of(context).dialogTheme.backgroundColor!
|
||||||
: Theme.of(context).primaryTextTheme!.titleLarge!.color!;
|
: Theme.of(context).primaryTextTheme!.titleLarge!.color!;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -413,7 +413,7 @@ class TipButton extends StatelessWidget {
|
||||||
}
|
}
|
||||||
|
|
||||||
return isSelected
|
return isSelected
|
||||||
? Theme.of(context).accentTextTheme!.titleLarge!.color!
|
? Theme.of(context).dialogTheme.backgroundColor!
|
||||||
: Theme.of(context).primaryTextTheme!.labelSmall!.color!;
|
: Theme.of(context).primaryTextTheme!.labelSmall!.color!;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -120,10 +120,7 @@ class AddressTextField extends StatelessWidget {
|
||||||
padding: EdgeInsets.all(8),
|
padding: EdgeInsets.all(8),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: buttonColor ??
|
color: buttonColor ??
|
||||||
Theme.of(context)
|
Theme.of(context).dialogTheme.backgroundColor,
|
||||||
.accentTextTheme!
|
|
||||||
.titleLarge!
|
|
||||||
.color!,
|
|
||||||
borderRadius:
|
borderRadius:
|
||||||
BorderRadius.all(Radius.circular(6))),
|
BorderRadius.all(Radius.circular(6))),
|
||||||
child: Image.asset(
|
child: Image.asset(
|
||||||
|
@ -148,10 +145,7 @@ class AddressTextField extends StatelessWidget {
|
||||||
padding: EdgeInsets.all(8),
|
padding: EdgeInsets.all(8),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: buttonColor ??
|
color: buttonColor ??
|
||||||
Theme.of(context)
|
Theme.of(context).dialogTheme.backgroundColor,
|
||||||
.accentTextTheme
|
|
||||||
.titleLarge!
|
|
||||||
.color!,
|
|
||||||
borderRadius:
|
borderRadius:
|
||||||
BorderRadius.all(Radius.circular(6))),
|
BorderRadius.all(Radius.circular(6))),
|
||||||
child: Image.asset(
|
child: Image.asset(
|
||||||
|
@ -176,10 +170,7 @@ class AddressTextField extends StatelessWidget {
|
||||||
padding: EdgeInsets.all(8),
|
padding: EdgeInsets.all(8),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: buttonColor ??
|
color: buttonColor ??
|
||||||
Theme.of(context)
|
Theme.of(context).dialogTheme.backgroundColor,
|
||||||
.accentTextTheme!
|
|
||||||
.titleLarge!
|
|
||||||
.color!,
|
|
||||||
borderRadius:
|
borderRadius:
|
||||||
BorderRadius.all(Radius.circular(6))),
|
BorderRadius.all(Radius.circular(6))),
|
||||||
child: Image.asset(
|
child: Image.asset(
|
||||||
|
|
|
@ -53,10 +53,7 @@ class CheckBoxPickerState extends State<CheckBoxPicker> {
|
||||||
child: ClipRRect(
|
child: ClipRRect(
|
||||||
borderRadius: BorderRadius.all(Radius.circular(30)),
|
borderRadius: BorderRadius.all(Radius.circular(30)),
|
||||||
child: Container(
|
child: Container(
|
||||||
color: Theme.of(context)
|
color: Theme.of(context).dialogTheme.backgroundColor,
|
||||||
.accentTextTheme!
|
|
||||||
.titleLarge!
|
|
||||||
.color!,
|
|
||||||
child: ConstrainedBox(
|
child: ConstrainedBox(
|
||||||
constraints: BoxConstraints(
|
constraints: BoxConstraints(
|
||||||
maxHeight: MediaQuery.of(context).size.height * 0.65,
|
maxHeight: MediaQuery.of(context).size.height * 0.65,
|
||||||
|
@ -122,10 +119,7 @@ class CheckBoxPickerState extends State<CheckBoxPicker> {
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
height: 55,
|
height: 55,
|
||||||
color: Theme.of(context)
|
color: Theme.of(context).dialogTheme.backgroundColor,
|
||||||
.accentTextTheme!
|
|
||||||
.titleLarge!
|
|
||||||
.color!,
|
|
||||||
padding: EdgeInsets.only(left: 24, right: 24),
|
padding: EdgeInsets.only(left: 24, right: 24),
|
||||||
child: CheckboxListTile(
|
child: CheckboxListTile(
|
||||||
value: item.value,
|
value: item.value,
|
||||||
|
|
|
@ -143,10 +143,7 @@ class _PickerState<Item> extends State<Picker<Item>> {
|
||||||
child: ClipRRect(
|
child: ClipRRect(
|
||||||
borderRadius: BorderRadius.all(Radius.circular(30)),
|
borderRadius: BorderRadius.all(Radius.circular(30)),
|
||||||
child: Container(
|
child: Container(
|
||||||
color: Theme.of(context)
|
color: Theme.of(context).dialogTheme.backgroundColor,
|
||||||
.accentTextTheme!
|
|
||||||
.titleLarge!
|
|
||||||
.color!,
|
|
||||||
child: ConstrainedBox(
|
child: ConstrainedBox(
|
||||||
constraints: BoxConstraints(
|
constraints: BoxConstraints(
|
||||||
maxHeight: containerHeight,
|
maxHeight: containerHeight,
|
||||||
|
@ -302,10 +299,7 @@ class _PickerState<Item> extends State<Picker<Item>> {
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
height: 55,
|
height: 55,
|
||||||
color: Theme.of(context)
|
color: Theme.of(context).dialogTheme.backgroundColor,
|
||||||
.accentTextTheme!
|
|
||||||
.titleLarge!
|
|
||||||
.color!,
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 24),
|
padding: EdgeInsets.symmetric(horizontal: 24),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
@ -392,10 +386,7 @@ class _PickerState<Item> extends State<Picker<Item>> {
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
height: 55,
|
height: 55,
|
||||||
color: Theme.of(context)
|
color: Theme.of(context).dialogTheme.backgroundColor,
|
||||||
.accentTextTheme!
|
|
||||||
.titleLarge!
|
|
||||||
.color!,
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 24),
|
padding: EdgeInsets.symmetric(horizontal: 24),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
|
|
@ -189,7 +189,6 @@ class BrightTheme extends LightTheme {
|
||||||
accentTextTheme: TextTheme(
|
accentTextTheme: TextTheme(
|
||||||
// title -> titleLarge
|
// title -> titleLarge
|
||||||
titleLarge: TextStyle(
|
titleLarge: TextStyle(
|
||||||
color: Colors.white, // picker background
|
|
||||||
backgroundColor: Palette.periwinkleCraiola, // picker divider
|
backgroundColor: Palette.periwinkleCraiola, // picker divider
|
||||||
decorationColor: Colors.white // dialog background
|
decorationColor: Colors.white // dialog background
|
||||||
),
|
),
|
||||||
|
|
|
@ -27,6 +27,10 @@ class DarkTheme extends ThemeBase {
|
||||||
hoverColor: PaletteDark.cyanBlue, // amount hint text (receive page)
|
hoverColor: PaletteDark.cyanBlue, // amount hint text (receive page)
|
||||||
dividerColor: PaletteDark.dividerColor,
|
dividerColor: PaletteDark.dividerColor,
|
||||||
hintColor: PaletteDark.pigeonBlue, // menu
|
hintColor: PaletteDark.pigeonBlue, // menu
|
||||||
|
dialogTheme: super
|
||||||
|
.themeData
|
||||||
|
.dialogTheme
|
||||||
|
.copyWith(backgroundColor: PaletteDark.nightBlue),
|
||||||
textTheme: TextTheme(
|
textTheme: TextTheme(
|
||||||
// title -> titleLarge
|
// title -> titleLarge
|
||||||
titleLarge: TextStyle(
|
titleLarge: TextStyle(
|
||||||
|
@ -194,7 +198,6 @@ class DarkTheme extends ThemeBase {
|
||||||
accentTextTheme: TextTheme(
|
accentTextTheme: TextTheme(
|
||||||
// title -> titleLarge
|
// title -> titleLarge
|
||||||
titleLarge: TextStyle(
|
titleLarge: TextStyle(
|
||||||
color: PaletteDark.nightBlue, // picker background
|
|
||||||
backgroundColor: PaletteDark.dividerColor, // picker divider
|
backgroundColor: PaletteDark.dividerColor, // picker divider
|
||||||
decorationColor: PaletteDark.darkNightBlue // dialog background
|
decorationColor: PaletteDark.darkNightBlue // dialog background
|
||||||
),
|
),
|
||||||
|
|
|
@ -28,6 +28,10 @@ class LightTheme extends ThemeBase {
|
||||||
hoverColor: Palette.darkBlueCraiola, // amount hint text (receive page)
|
hoverColor: Palette.darkBlueCraiola, // amount hint text (receive page)
|
||||||
dividerColor: Palette.paleBlue,
|
dividerColor: Palette.paleBlue,
|
||||||
hintColor: Palette.gray,
|
hintColor: Palette.gray,
|
||||||
|
dialogTheme: super
|
||||||
|
.themeData
|
||||||
|
.dialogTheme
|
||||||
|
.copyWith(backgroundColor: Colors.white),
|
||||||
textTheme: TextTheme(
|
textTheme: TextTheme(
|
||||||
// title -> titleLarge
|
// title -> titleLarge
|
||||||
titleLarge: TextStyle(
|
titleLarge: TextStyle(
|
||||||
|
@ -192,7 +196,6 @@ class LightTheme extends ThemeBase {
|
||||||
accentTextTheme: TextTheme(
|
accentTextTheme: TextTheme(
|
||||||
// title -> headlititleLargene6
|
// title -> headlititleLargene6
|
||||||
titleLarge: TextStyle(
|
titleLarge: TextStyle(
|
||||||
color: Colors.white, // picker background
|
|
||||||
backgroundColor: Palette.periwinkleCraiola, // picker divider
|
backgroundColor: Palette.periwinkleCraiola, // picker divider
|
||||||
decorationColor: Colors.white // dialog background
|
decorationColor: Colors.white // dialog background
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in a new issue