@@ -31,10 +31,6 @@ class EditOrderScreen extends StatefulWidget {
3131}
3232
3333class _EditOrderScreenState extends State <EditOrderScreen > {
34- void update () {
35- setState (() {});
36- }
37-
3834 @override
3935 Widget build (BuildContext context) {
4036 List feedsNames = Hive .box ('feeds' ).get (
@@ -200,7 +196,7 @@ class _EditOrderScreenState extends State<EditOrderScreen> {
200196 Hive .box ('feeds' )
201197 .put ('feedsDetails' , feedsDetails);
202198 Navigator .of (context).pop ();
203- update ( );
199+ setState (() {} );
204200 if (widget.updateParent != null ) {
205201 widget.updateParent !();
206202 }
@@ -266,63 +262,74 @@ class _EditOrderScreenState extends State<EditOrderScreen> {
266262 padding: EdgeInsets .only (right: 15 ),
267263 onPressed: () => showCustomBottomSheet (
268264 context,
269- Column (
270- mainAxisAlignment: MainAxisAlignment .center,
271- crossAxisAlignment: CrossAxisAlignment .center,
272- mainAxisSize: MainAxisSize .min,
273- children: < Widget > [
274- Text (
275- AppLocalizations .of (context)! .deleteCustomFeed,
276- style: TextStyle (
277- fontSize: 20.0 ,
278- ), // here
279- textAlign: TextAlign .center,
265+ SizedBox (
266+ child: Padding (
267+ padding: EdgeInsets .fromLTRB (
268+ 20 ,
269+ 15 ,
270+ 20 ,
271+ 15 ,
280272 ),
281- Padding (
282- padding: EdgeInsets .only (top: 5 , bottom: 5 ),
283- child: Text (
284- AppLocalizations .of (context)! .deleteUrl,
285- ),
286- ),
287- Padding (
288- padding: EdgeInsets .only (top: 20 , bottom: 7 ),
289- child: Container (
290- width: double .infinity,
291- height: 50 ,
292- child: FilledButton .tonal (
293- onPressed: () {
294- feedsDetails.remove (feedsNames[index]);
295- Hive .box ('feeds' ).put ('feedsDetails' , feedsDetails);
296- feedsNames.remove (feedsNames[index]);
297- Hive .box ('feeds' ).put ('feedsNames' , feedsNames);
298- Navigator .of (context).pop ();
299- setState (() {});
300- if (widget.updateParent != null ) {
301- widget.updateParent !();
302- }
303- },
273+ child: Column (
274+ mainAxisAlignment: MainAxisAlignment .center,
275+ crossAxisAlignment: CrossAxisAlignment .center,
276+ mainAxisSize: MainAxisSize .min,
277+ children: < Widget > [
278+ Text (
279+ AppLocalizations .of (context)! .deleteCustomFeed,
280+ style: TextStyle (
281+ fontSize: 20.0 ,
282+ ), // here
283+ textAlign: TextAlign .center,
284+ ),
285+ Padding (
286+ padding: EdgeInsets .only (top: 5 , bottom: 5 ),
304287 child: Text (
305- AppLocalizations .of (context)! .yes ,
288+ AppLocalizations .of (context)! .deleteUrl ,
306289 ),
307290 ),
308- ),
309- ),
310- Padding (
311- padding: EdgeInsets .only (top: 7 , bottom: 20 ),
312- child: Container (
313- width: double .infinity,
314- height: 50 ,
315- child: OutlinedButton (
316- onPressed: () {
317- Navigator .of (context).pop ();
318- },
319- child: Text (
320- AppLocalizations .of (context)! .close,
291+ Padding (
292+ padding: EdgeInsets .only (top: 20 , bottom: 7 ),
293+ child: Container (
294+ width: double .infinity,
295+ height: 50 ,
296+ child: FilledButton .tonal (
297+ onPressed: () {
298+ feedsDetails.remove (feedsNames[index]);
299+ Hive .box ('feeds' )
300+ .put ('feedsDetails' , feedsDetails);
301+ feedsNames.remove (feedsNames[index]);
302+ Hive .box ('feeds' ).put ('feedsNames' , feedsNames);
303+ Navigator .of (context).pop ();
304+ setState (() {});
305+ if (widget.updateParent != null ) {
306+ widget.updateParent !();
307+ }
308+ },
309+ child: Text (
310+ AppLocalizations .of (context)! .yes,
311+ ),
312+ ),
321313 ),
322314 ),
323- ),
315+ Padding (
316+ padding: EdgeInsets .only (top: 7 , bottom: 20 ),
317+ child: Container (
318+ width: double .infinity,
319+ height: 50 ,
320+ child: OutlinedButton (
321+ onPressed: () {
322+ Navigator .of (context).pop ();
323+ },
324+ child: Text (
325+ AppLocalizations .of (context)! .close,
326+ ),
327+ ),
328+ ),
329+ ),
330+ ],
324331 ),
325- ] ,
332+ ) ,
326333 ),
327334 ),
328335 ),
0 commit comments