Mobile CLient: warning dialog: fix default action button color

This commit is contained in:
Arthi-chaud
2022-03-05 10:46:07 +01:00
parent 40792349ae
commit 5edfd13f30
2 changed files with 7 additions and 3 deletions
@@ -87,7 +87,9 @@ class _AnimatedBackgroundState extends State<AnimatedBackground> with TickerProv
});
Timer(const Duration(milliseconds: 2500), () {
topAnimController.forward();
try {
topAnimController.forward();
} catch (e) {}
});
bottomAnimController.forward();
+4 -2
View File
@@ -13,7 +13,7 @@ class WarningDialog extends StatelessWidget {
///The action to execute once the warning was accepted
final void Function() onAccept;
///Color of the button that trigger the action
Color? actionButtonColor = Theme.of(Aeris.materialKey.currentContext!).colorScheme.error;
Color? actionButtonColor;
WarningDialog(
{Key? key,
@@ -21,7 +21,9 @@ class WarningDialog extends StatelessWidget {
this.actionButtonColor,
required this.onAccept,
required this.warnedAction})
: super(key: key);
: super(key: key) {
actionButtonColor ??= Theme.of(Aeris.materialKey.currentContext!).colorScheme.error;
}
@override
Widget build(BuildContext context) {