Apply flat button styling globally, ie. dialogs
This commit is contained in:
parent
d6cd740532
commit
47e3f76bca
|
|
@ -20,17 +20,21 @@ class AppTextButton extends StatelessWidget {
|
||||||
final store = StoreProvider.of<AppState>(context);
|
final store = StoreProvider.of<AppState>(context);
|
||||||
final state = store.state;
|
final state = store.state;
|
||||||
|
|
||||||
final ButtonStyle flatButtonStyle = TextButton.styleFrom(
|
Color primaryColor;
|
||||||
primary: onPressed == null
|
if (onPressed == null) {
|
||||||
? null
|
//
|
||||||
: color != null
|
} else if (color != null) {
|
||||||
? color
|
primaryColor = color;
|
||||||
: isInHeader
|
} else if (isInHeader) {
|
||||||
? state.headerTextColor
|
primaryColor = state.headerTextColor;
|
||||||
: state.prefState.enableDarkMode
|
} else if (state.prefState.enableDarkMode) {
|
||||||
? Colors.white
|
primaryColor = Colors.white;
|
||||||
: Colors.black87,
|
} else {
|
||||||
);
|
primaryColor = Colors.black87;
|
||||||
|
}
|
||||||
|
|
||||||
|
final ButtonStyle flatButtonStyle =
|
||||||
|
TextButton.styleFrom(primary: primaryColor);
|
||||||
|
|
||||||
return TextButton(
|
return TextButton(
|
||||||
style: flatButtonStyle,
|
style: flatButtonStyle,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue