File tree Expand file tree Collapse file tree 6 files changed +25
-58
lines changed Expand file tree Collapse file tree 6 files changed +25
-58
lines changed Original file line number Diff line number Diff line change @@ -320,23 +320,20 @@ class _CompleteFormState extends State<CompleteForm> {
320
320
],
321
321
),
322
322
),
323
+ const SizedBox (height: 8 ),
323
324
Row (
324
325
children: < Widget > [
325
326
Expanded (
326
327
child: ElevatedButton (
327
- onPressed: () {
328
- if (_formKey.currentState? .saveAndValidate () ?? false ) {
329
- debugPrint (_formKey.currentState? .value.toString ());
330
- } else {
331
- debugPrint (_formKey.currentState? .value.toString ());
332
- debugPrint ('validation failed' );
333
- }
334
- },
335
- child: const Text (
336
- 'Submit' ,
337
- style: TextStyle (color: Colors .white),
338
- ),
339
- ),
328
+ onPressed: () {
329
+ if (_formKey.currentState? .saveAndValidate () ?? false ) {
330
+ debugPrint (_formKey.currentState? .value.toString ());
331
+ } else {
332
+ debugPrint (_formKey.currentState? .value.toString ());
333
+ debugPrint ('validation failed' );
334
+ }
335
+ },
336
+ child: const Text ('Submit' )),
340
337
),
341
338
const SizedBox (width: 20 ),
342
339
Expanded (
@@ -345,11 +342,7 @@ class _CompleteFormState extends State<CompleteForm> {
345
342
_formKey.currentState? .reset ();
346
343
},
347
344
// color: Theme.of(context).colorScheme.secondary,
348
- child: Text (
349
- 'Reset' ,
350
- style: TextStyle (
351
- color: Theme .of (context).colorScheme.secondary),
352
- ),
345
+ child: const Text ('Reset' ),
353
346
),
354
347
),
355
348
],
Original file line number Diff line number Diff line change @@ -54,12 +54,8 @@ class _ConditionalFieldsState extends State<ConditionalFields> {
54
54
child: const Text ('Magic info' ),
55
55
),
56
56
const SizedBox (height: 10 ),
57
- MaterialButton (
58
- color: Theme .of (context).colorScheme.secondary,
59
- child: const Text (
60
- "Submit" ,
61
- style: TextStyle (color: Colors .white),
62
- ),
57
+ ElevatedButton (
58
+ child: const Text ("Submit" ),
63
59
onPressed: () {
64
60
_formKey.currentState! .saveAndValidate ();
65
61
debugPrint (_formKey.currentState? .instantValue.toString () ?? '' );
Original file line number Diff line number Diff line change @@ -80,12 +80,8 @@ class _CustomFieldsState extends State<CustomFields> {
80
80
Row (
81
81
children: < Widget > [
82
82
Expanded (
83
- child: MaterialButton (
84
- color: Theme .of (context).colorScheme.secondary,
85
- child: const Text (
86
- "Submit" ,
87
- style: TextStyle (color: Colors .white),
88
- ),
83
+ child: ElevatedButton (
84
+ child: const Text ("Submit" ),
89
85
onPressed: () {
90
86
_formKey.currentState! .save ();
91
87
if (_formKey.currentState! .validate ()) {
@@ -98,12 +94,8 @@ class _CustomFieldsState extends State<CustomFields> {
98
94
),
99
95
const SizedBox (width: 20 ),
100
96
Expanded (
101
- child: MaterialButton (
102
- color: Theme .of (context).colorScheme.secondary,
103
- child: const Text (
104
- "Reset" ,
105
- style: TextStyle (color: Colors .white),
106
- ),
97
+ child: ElevatedButton (
98
+ child: const Text ("Reset" ),
107
99
onPressed: () {
108
100
_formKey.currentState! .reset ();
109
101
},
Original file line number Diff line number Diff line change @@ -46,12 +46,8 @@ class _DynamicFieldsState extends State<DynamicFields> {
46
46
Row (
47
47
children: < Widget > [
48
48
Expanded (
49
- child: MaterialButton (
50
- color: Theme .of (context).colorScheme.secondary,
51
- child: const Text (
52
- "Submit" ,
53
- style: TextStyle (color: Colors .white),
54
- ),
49
+ child: ElevatedButton (
50
+ child: const Text ("Submit" ),
55
51
onPressed: () {
56
52
_formKey.currentState! .saveAndValidate ();
57
53
setState (() {
@@ -63,12 +59,8 @@ class _DynamicFieldsState extends State<DynamicFields> {
63
59
),
64
60
const SizedBox (width: 20 ),
65
61
Expanded (
66
- child: MaterialButton (
67
- color: Theme .of (context).colorScheme.secondary,
68
- child: const Text (
69
- "Add field" ,
70
- style: TextStyle (color: Colors .white),
71
- ),
62
+ child: ElevatedButton (
63
+ child: const Text ("Add field" ),
72
64
onPressed: () {
73
65
final newTextFieldName = 'name_${_newTextFieldId ++}' ;
74
66
final newTextFieldKey = ValueKey (_newTextFieldId);
Original file line number Diff line number Diff line change @@ -64,12 +64,8 @@ class _RelatedFieldsState extends State<RelatedFields> {
64
64
.toList (),
65
65
),
66
66
const SizedBox (height: 10 ),
67
- MaterialButton (
68
- color: Theme .of (context).colorScheme.secondary,
69
- child: const Text (
70
- "Submit" ,
71
- style: TextStyle (color: Colors .white),
72
- ),
67
+ ElevatedButton (
68
+ child: const Text ("Submit" ),
73
69
onPressed: () {
74
70
_formKey.currentState! .saveAndValidate ();
75
71
debugPrint (_formKey.currentState? .instantValue.toString () ?? '' );
Original file line number Diff line number Diff line change @@ -89,8 +89,7 @@ class _SignupFormState extends State<SignupForm> {
89
89
},
90
90
),
91
91
const SizedBox (height: 10 ),
92
- MaterialButton (
93
- color: Theme .of (context).colorScheme.secondary,
92
+ ElevatedButton (
94
93
onPressed: () {
95
94
if (_formKey.currentState? .saveAndValidate () ?? false ) {
96
95
if (true ) {
@@ -103,8 +102,7 @@ class _SignupFormState extends State<SignupForm> {
103
102
}
104
103
debugPrint (_formKey.currentState? .value.toString ());
105
104
},
106
- child:
107
- const Text ('Signup' , style: TextStyle (color: Colors .white)),
105
+ child: const Text ('Signup' ),
108
106
)
109
107
],
110
108
),
You can’t perform that action at this time.
0 commit comments