Explorar o código

Close dialog after 1 second in success state

ashilkn %!s(int64=2) %!d(string=hai) anos
pai
achega
d42d024d30
Modificáronse 1 ficheiros con 7 adicións e 2 borrados
  1. 7 2
      lib/ui/components/button_widget.dart

+ 7 - 2
lib/ui/components/button_widget.dart

@@ -421,8 +421,13 @@ class _ButtonChildWidgetState extends State<ButtonChildWidget> {
           setState(() {
             executionState = ExecutionState.successful;
             Future.delayed(
-                Duration(seconds: widget.shouldSurfaceExecutionStates ? 2 : 0),
-                () {
+                Duration(
+                  seconds: widget.isInAlert
+                      ? 1
+                      : widget.shouldSurfaceExecutionStates
+                          ? 2
+                          : 0,
+                ), () {
               widget.isInAlert
                   ? Navigator.of(context, rootNavigator: true)
                       .pop(widget.buttonAction)