Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR DART

flutter display alert dialog after server error

Provider.of<NewsProvider>(context, listen: false)
.fetchAndSetNewsList()
.catchError((error) => showDialog(context: context, builder: (context) {
   return new SimpleDialog(
       children: <Widget>[
            new Center(child: new Container(child: new Text('foo')))
       ]);
}))
       
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #flutter #display #alert #dialog #server #error
ADD COMMENT
Topic
Name
7+4 =