diff --git a/mobile/lib/src/widgets/background/animated_background.dart b/mobile/lib/src/widgets/background/animated_background.dart index 652da0c..f0694a8 100644 --- a/mobile/lib/src/widgets/background/animated_background.dart +++ b/mobile/lib/src/widgets/background/animated_background.dart @@ -87,7 +87,9 @@ class _AnimatedBackgroundState extends State with TickerProv }); Timer(const Duration(milliseconds: 2500), () { - topAnimController.forward(); + try { + topAnimController.forward(); + } catch (e) {} }); bottomAnimController.forward(); diff --git a/mobile/lib/src/widgets/warning_dialog.dart b/mobile/lib/src/widgets/warning_dialog.dart index 0a69790..d463291 100644 --- a/mobile/lib/src/widgets/warning_dialog.dart +++ b/mobile/lib/src/widgets/warning_dialog.dart @@ -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) {