Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR DART

show dialog close flutter

  BuildContext dialogContext; // <<----
  showDialog(
    context: context, // <<----
    barrierDismissible: false,
    builder: (BuildContext context) {
      dialogContext = context;
      return Dialog(
        child: new Row(
          mainAxisSize: MainAxisSize.min,
          children: [
            new CircularProgressIndicator(),
            new Text("Loading"),
          ],
        ),
      );
    },
  );

  await _longOperation();
  Navigator.pop(dialogContext); // <<----
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #show #dialog #close #flutter
ADD COMMENT
Topic
Name
3+9 =