@@ -41,9 +41,7 @@ class _TextAddEditState extends State<TextAddEdit> {
41
41
left: 16 ,
42
42
top: 16 ,
43
43
right: 16 ,
44
- bottom: paddingBottom > 0
45
- ? paddingBottom + insetBottom
46
- : 16 + insetBottom,
44
+ bottom: paddingBottom > 0 ? paddingBottom + insetBottom : 16 + insetBottom,
47
45
),
48
46
child: Form (
49
47
key: formState,
@@ -54,7 +52,7 @@ class _TextAddEditState extends State<TextAddEdit> {
54
52
Center (
55
53
child: Text (
56
54
widget.isEdit! ? 'Edit Text' : 'Add Text' ,
57
- style: Theme .of (context).textTheme.subtitle2 ,
55
+ style: Theme .of (context).textTheme.titleSmall ,
58
56
),
59
57
),
60
58
TextFormField (
@@ -66,9 +64,7 @@ class _TextAddEditState extends State<TextAddEdit> {
66
64
widgetJson[widget.index! ]! ['name' ] = value;
67
65
},
68
66
validator: (value) {
69
- return value == null || value.isEmpty
70
- ? 'Please insert your message'
71
- : null ;
67
+ return value == null || value.isEmpty ? 'Please insert your message' : null ;
72
68
},
73
69
),
74
70
SizedBox (height: 8 ),
@@ -80,8 +76,7 @@ class _TextAddEditState extends State<TextAddEdit> {
80
76
min: 0.0 ,
81
77
max: 100.0 ,
82
78
onChangeEnd: (value) {
83
- setState (() =>
84
- widgetJson[widget.index! ]! ['size' ] = value.toDouble ());
79
+ setState (() => widgetJson[widget.index! ]! ['size' ] = value.toDouble ());
85
80
},
86
81
onChanged: (value) {
87
82
setState (() {
@@ -100,8 +95,8 @@ class _TextAddEditState extends State<TextAddEdit> {
100
95
Navigator .pop (context);
101
96
},
102
97
style: ElevatedButton .styleFrom (
103
- primary : Colors .red ,
104
- onPrimary : Colors .white ,
98
+ foregroundColor : Colors .white ,
99
+ backgroundColor : Colors .red ,
105
100
),
106
101
child: Text ('REMOVE' ),
107
102
),
@@ -113,8 +108,8 @@ class _TextAddEditState extends State<TextAddEdit> {
113
108
Navigator .pop (context);
114
109
},
115
110
style: ElevatedButton .styleFrom (
116
- primary : Colors .black ,
117
- onPrimary : Colors .white ,
111
+ foregroundColor : Colors .white ,
112
+ backgroundColor : Colors .black ,
118
113
),
119
114
child: Text ('UPDATE' ),
120
115
),
@@ -130,8 +125,8 @@ class _TextAddEditState extends State<TextAddEdit> {
130
125
}
131
126
},
132
127
style: ElevatedButton .styleFrom (
133
- primary : Colors .black ,
134
- onPrimary : Colors .white ,
128
+ foregroundColor : Colors .white ,
129
+ backgroundColor : Colors .black ,
135
130
),
136
131
child: Text ('SAVE TEXT' ),
137
132
),
0 commit comments