mirror of
https://github.com/nisrulz/flutter-examples.git
synced 2025-08-24 23:02:17 +08:00
fix deprecated showDialog() argument
This commit is contained in:
@ -49,7 +49,7 @@ class TipCalculator extends StatelessWidget {
|
||||
"Total: \$$total"));
|
||||
|
||||
// Show dialog
|
||||
showDialog(context: context, child: dialog);
|
||||
showDialog(context: context, builder: (BuildContext context) => dialog);
|
||||
});
|
||||
|
||||
Container container = new Container(
|
||||
|
@ -32,7 +32,7 @@ class MyHomeState extends State<MyHome> {
|
||||
// On press of the button
|
||||
onPressed: () {
|
||||
// Show dialog
|
||||
showDialog(context: context, child: dialog);
|
||||
showDialog(context: context, builder: (BuildContext context) => dialog);
|
||||
}),
|
||||
),
|
||||
));
|
||||
|
Reference in New Issue
Block a user