Reputation: 3319
Does builder function creates new context here, and how to pass context then.
showDialog(context: context, builder: (context) => Center(
child: Container(
child: Text('some text'),),));
result:
Upvotes: 0
Views: 315
Reputation: 12673
Wrap the Center
in Dialog
widget to get a white background.
Dialog(
child: Center(...)
)
If you want to keep it transparent, wrap the Center
in Material
Material(
child: Center(...)
)
Upvotes: 1