Skip to content

Commit 27c67ad

Browse files
feat: improve example buttons
1 parent 3a33bee commit 27c67ad

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

example/lib/main.dart

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,7 @@ class MyHomePageState extends State<MyHomePage> {
152152
Row(
153153
children: <Widget>[
154154
Expanded(
155-
child: MaterialButton(
156-
color: Theme.of(context).colorScheme.secondary,
155+
child: ElevatedButton(
157156
onPressed: () {
158157
if (_formKey.currentState?.saveAndValidate() ??
159158
false) {
@@ -163,10 +162,7 @@ class MyHomePageState extends State<MyHomePage> {
163162
debugPrint('validation failed');
164163
}
165164
},
166-
child: const Text(
167-
'Submit',
168-
style: TextStyle(color: Colors.white),
169-
),
165+
child: const Text('Submit'),
170166
),
171167
),
172168
const SizedBox(width: 20),
@@ -176,11 +172,7 @@ class MyHomePageState extends State<MyHomePage> {
176172
_formKey.currentState?.reset();
177173
},
178174
// color: Theme.of(context).colorScheme.secondary,
179-
child: Text(
180-
'Reset',
181-
style: TextStyle(
182-
color: Theme.of(context).colorScheme.secondary),
183-
),
175+
child: const Text('Reset'),
184176
),
185177
),
186178
],

0 commit comments

Comments
 (0)