I\'m trying to use the showDialog(context, builder) to display a greeting message when the user navigates to a certain page.
I tried this by calling the
@override
void initState() {
super.initState();
WidgetsBinding.instance.addPostFrameCallback((_) async {
await showDialog(
context: context,
builder: (BuildContext context) => new showDialog(
context: context,
builder: (BuildContext context) {
return new Container(child: new Text('foo'));
});
);
});
}