Skip to content

Commit 8dfb96e

Browse files
authored
Merge pull request nisrulz#28 from ShinokiRyosei/fix/deprecated-argument
fix deprecated showDialog() argument
2 parents 69a70bc + 7ef9ad3 commit 8dfb96e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tip_calculator/lib/main.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class TipCalculator extends StatelessWidget {
4949
"Total: \$$total"));
5050

5151
// Show dialog
52-
showDialog(context: context, child: dialog);
52+
showDialog(context: context, builder: (BuildContext context) => dialog);
5353
});
5454

5555
Container container = new Container(

using_alert_dialog/lib/main.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class MyHomeState extends State<MyHome> {
3232
// On press of the button
3333
onPressed: () {
3434
// Show dialog
35-
showDialog(context: context, child: dialog);
35+
showDialog(context: context, builder: (BuildContext context) => dialog);
3636
}),
3737
),
3838
));

0 commit comments

Comments
 (0)