@@ -41,9 +41,7 @@ class _TextAddEditState extends State<TextAddEdit> {
4141 left: 16 ,
4242 top: 16 ,
4343 right: 16 ,
44- bottom: paddingBottom > 0
45- ? paddingBottom + insetBottom
46- : 16 + insetBottom,
44+ bottom: paddingBottom > 0 ? paddingBottom + insetBottom : 16 + insetBottom,
4745 ),
4846 child: Form (
4947 key: formState,
@@ -54,7 +52,7 @@ class _TextAddEditState extends State<TextAddEdit> {
5452 Center (
5553 child: Text (
5654 widget.isEdit! ? 'Edit Text' : 'Add Text' ,
57- style: Theme .of (context).textTheme.subtitle2 ,
55+ style: Theme .of (context).textTheme.titleSmall ,
5856 ),
5957 ),
6058 TextFormField (
@@ -66,9 +64,7 @@ class _TextAddEditState extends State<TextAddEdit> {
6664 widgetJson[widget.index! ]! ['name' ] = value;
6765 },
6866 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 ;
7268 },
7369 ),
7470 SizedBox (height: 8 ),
@@ -80,8 +76,7 @@ class _TextAddEditState extends State<TextAddEdit> {
8076 min: 0.0 ,
8177 max: 100.0 ,
8278 onChangeEnd: (value) {
83- setState (() =>
84- widgetJson[widget.index! ]! ['size' ] = value.toDouble ());
79+ setState (() => widgetJson[widget.index! ]! ['size' ] = value.toDouble ());
8580 },
8681 onChanged: (value) {
8782 setState (() {
@@ -100,8 +95,8 @@ class _TextAddEditState extends State<TextAddEdit> {
10095 Navigator .pop (context);
10196 },
10297 style: ElevatedButton .styleFrom (
103- primary : Colors .red ,
104- onPrimary : Colors .white ,
98+ foregroundColor : Colors .white ,
99+ backgroundColor : Colors .red ,
105100 ),
106101 child: Text ('REMOVE' ),
107102 ),
@@ -113,8 +108,8 @@ class _TextAddEditState extends State<TextAddEdit> {
113108 Navigator .pop (context);
114109 },
115110 style: ElevatedButton .styleFrom (
116- primary : Colors .black ,
117- onPrimary : Colors .white ,
111+ foregroundColor : Colors .white ,
112+ backgroundColor : Colors .black ,
118113 ),
119114 child: Text ('UPDATE' ),
120115 ),
@@ -130,8 +125,8 @@ class _TextAddEditState extends State<TextAddEdit> {
130125 }
131126 },
132127 style: ElevatedButton .styleFrom (
133- primary : Colors .black ,
134- onPrimary : Colors .white ,
128+ foregroundColor : Colors .white ,
129+ backgroundColor : Colors .black ,
135130 ),
136131 child: Text ('SAVE TEXT' ),
137132 ),
0 commit comments