Menu
Newbedev LogoNEWBEDEV Python Javascript Linux Cheat sheet
Newbedev LogoNEWBEDEV
  • Python 1
  • Javascript
  • Linux
  • Cheat sheet
  • Contact

How to dismiss an AlertDialog on a FlatButton click?

Navigator.pop(_)

worked for me, but the Flutter Team's gallery contains an example using:

Navigator.of(context, rootNavigator: true).pop()

which also works, and I am tempted to follow their lead.


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)


Navigator.of(context, rootNavigator: true).pop('dialog')

worked with me.

Tags:

Ios

Android

Flutter

Flutter Alertdialog

Related

EMR Spark - TransportClient: Failed to send RPC NLP reverse tokenizing (going from tokens to nicely formatted sentence) remove virtual environment created with venv in python3 How to measure the execution time of a promise? Sonarqube is not showing code coverage after running Could it be that (Alternative f, Foldable f) => Monad f? When to cache a DataFrame? Duck typing with python 3.5 style type-annotations How to create range slider (Angular Material) in Angular 4? Not allowed to set the device owner because there are already several users on the device ignore a particular folder only in .gitignore but allow other folders with same name to be checked in Matplotlib AttributeError: 'module' object has no attribute 'popall'

Recent Posts

Pandas how to find column contains a certain value Recommended way to install multiple Python versions on Ubuntu 20.04 Build super fast web scraper with Python x100 than BeautifulSoup How to convert a SQL query result to a Pandas DataFrame in Python How to write a Pandas DataFrame to a .csv file in Python
© 2021 newbedevPrivacy Policy