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"));
|
"Total: \$$total"));
|
||||||
|
|
||||||
// Show dialog
|
// Show dialog
|
||||||
showDialog(context: context, child: dialog);
|
showDialog(context: context, builder: (BuildContext context) => dialog);
|
||||||
});
|
});
|
||||||
|
|
||||||
Container container = new Container(
|
Container container = new Container(
|
||||||
|
@ -32,7 +32,7 @@ class MyHomeState extends State<MyHome> {
|
|||||||
// On press of the button
|
// On press of the button
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
// Show dialog
|
// Show dialog
|
||||||
showDialog(context: context, child: dialog);
|
showDialog(context: context, builder: (BuildContext context) => dialog);
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
));
|
));
|
||||||
|
Reference in New Issue
Block a user