Reputation: 47
I am using showAlertDialog to alert the user to sign in with the following code:
showAlertDialog(BuildContext context){
AlertDialog alert=AlertDialog(
content: new Row(
children: [
CircularProgressIndicator(),
Container(margin: EdgeInsets.only(left: 5),child:Text("Loading" )),
],),
);
showDialog(barrierDismissible: false,
context:context,
builder:(BuildContext context){
return alert;
},
);
}
And through the next line of code I run and show it to the user:
showAlertDialog(context);
The problem now: I am trying to stop or hide its work through the following line of code, but the matter does not work, I cannot hide it.
Navigator.pop(context);
Is there a solution for that? I need to stop it and hide it.
thank you
Upvotes: 0
Views: 285