Fix alert for cupertino OS

This commit is contained in:
Jonas Franz 2018-09-15 18:33:41 +02:00
parent 9dc281317b
commit 08df1bf2c2
No known key found for this signature in database
GPG Key ID: C8287A01D593AC1D
1 changed files with 2 additions and 18 deletions

View File

@ -27,8 +27,7 @@ class HomePageState extends State<HomePage> {
var textController = new TextEditingController();
showDialog(
context: context,
child: new _SystemPadding(
child: new AlertDialog(
child: new AlertDialog(
contentPadding: const EdgeInsets.all(16.0),
content: new Row(children: <Widget>[
Expanded(
@ -55,7 +54,7 @@ class HomePageState extends State<HomePage> {
)
],
),
));
);
}
@override
@ -98,18 +97,3 @@ class HomePageState extends State<HomePage> {
);
}
}
class _SystemPadding extends StatelessWidget {
final Widget child;
_SystemPadding({Key key, this.child}) : super(key: key);
@override
Widget build(BuildContext context) {
var mediaQuery = MediaQuery.of(context);
return new AnimatedContainer(
padding: mediaQuery.viewInsets,
duration: const Duration(milliseconds: 300),
child: child);
}
}