fix deprecated showDialog() argument

This commit is contained in:
ShinokiRyosei
2019-01-03 18:31:33 +09:00
parent 3ea3b368da
commit 7ef9ad322f
2 changed files with 2 additions and 2 deletions

View File

@ -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(

View File

@ -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);
}), }),
), ),
)); ));