Issue
I have the following AlertDialog.
showDialog(
context: context,
child: new AlertDialog(
title: const Text("Location disabled"),
content: const Text(
"""
Location is disabled on this device. Please enable it and try again.
"""),
actions: [
new FlatButton(
child: const Text("Ok"),
onPressed: _dismissDialog,
),
],
),
);
How can I make _dismissDialog() dismiss said AlertDialog?
Solution
Navigator.pop() should do the trick. You can also use that to return the result of the dialog (if it presented the user with choices)
Answered By - Collin Jackson
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.