Commit f4e7b4e1 by Anuj Committed by GitHub

Fixed center problem of buttons. (#459)

* Fixed center problem of buttons of the issue #458

* Fixed center problem of buttons of the issue #458 for toast_context page
parent c91a2268
...@@ -26,6 +26,6 @@ subprojects { ...@@ -26,6 +26,6 @@ subprojects {
project.evaluationDependsOn(':app') project.evaluationDependsOn(':app')
} }
task clean(type: Delete) { tasks.register("clean", Delete) {
delete rootProject.buildDir delete rootProject.buildDir
} }
...@@ -25,7 +25,8 @@ class _MyAppState extends State<MyApp> { ...@@ -25,7 +25,8 @@ class _MyAppState extends State<MyApp> {
appBar: AppBar( appBar: AppBar(
title: Text("Toast"), title: Text("Toast"),
), ),
body: Column( body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
ElevatedButton( ElevatedButton(
...@@ -49,6 +50,7 @@ class _MyAppState extends State<MyApp> { ...@@ -49,6 +50,7 @@ class _MyAppState extends State<MyApp> {
), ),
], ],
), ),
),
); );
} }
} }
...@@ -139,7 +139,8 @@ class _ToastContextState extends State<ToastContext> { ...@@ -139,7 +139,8 @@ class _ToastContextState extends State<ToastContext> {
appBar: AppBar( appBar: AppBar(
title: Text("Custom Toasts"), title: Text("Custom Toasts"),
), ),
body: Column( body: Center(
child: Column(
children: [ children: [
SizedBox( SizedBox(
height: 24.0, height: 24.0,
...@@ -194,6 +195,7 @@ class _ToastContextState extends State<ToastContext> { ...@@ -194,6 +195,7 @@ class _ToastContextState extends State<ToastContext> {
), ),
], ],
), ),
),
); );
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment