@@ -137,7 +137,7 @@ const String _displayP3Logo =
137
137
'gr3yrjmlwqXLjmWw1O2I5Wmp9Xxjyh+AVIZ6ADIAqcwClakzeMgApDILVKbO4CED'
138
138
'kMosUJk6g4dUBuRfvf1am9VRqzYAAAAASUVORK5CYII=' ;
139
139
140
- void main () => run (Setup .sweepGradient );
140
+ void main () => run (Setup .container );
141
141
142
142
enum Setup {
143
143
none,
@@ -146,10 +146,6 @@ enum Setup {
146
146
blur,
147
147
drawnImage,
148
148
container,
149
- linearGradient,
150
- radialGradient,
151
- conicalGradient,
152
- sweepGradient,
153
149
}
154
150
155
151
void run (Setup setup) {
@@ -269,14 +265,7 @@ class _MyHomePageState extends State<MyHomePage> {
269
265
_loadImage ().then ((ui.Image ? value) => setState (() { _image = value; }));
270
266
case Setup .drawnImage:
271
267
_drawImage ().then ((ui.Image ? value) => setState (() { _image = value; }));
272
- case Setup .image ||
273
- Setup .blur ||
274
- Setup .none ||
275
- Setup .container ||
276
- Setup .linearGradient ||
277
- Setup .radialGradient ||
278
- Setup .conicalGradient ||
279
- Setup .sweepGradient:
268
+ case Setup .image || Setup .blur || Setup .none || Setup .container:
280
269
break ;
281
270
}
282
271
super .initState ();
@@ -319,97 +308,6 @@ class _MyHomePageState extends State<MyHomePage> {
319
308
green: 0 ,
320
309
blue: 0 ,
321
310
colorSpace: ui.ColorSpace .displayP3));
322
- case Setup .linearGradient:
323
- imageWidget = Container (
324
- width: 100 ,
325
- height: 100 ,
326
- decoration: const BoxDecoration (
327
- gradient: LinearGradient (
328
- begin: Alignment .topLeft,
329
- end: Alignment .bottomRight,
330
- colors: < Color > [
331
- Color .from (
332
- alpha: 1 ,
333
- red: 1 ,
334
- green: 0 ,
335
- blue: 0 ,
336
- colorSpace: ui.ColorSpace .displayP3),
337
- Color .from (
338
- alpha: 1 ,
339
- red: 0 ,
340
- green: 1 ,
341
- blue: 0 ,
342
- colorSpace: ui.ColorSpace .displayP3)],
343
- ),
344
- ),
345
- );
346
- case Setup .radialGradient:
347
- imageWidget = Container (
348
- width: 100 ,
349
- height: 100 ,
350
- decoration: const BoxDecoration (
351
- gradient: RadialGradient (
352
- colors: < Color > [
353
- Color .from (
354
- alpha: 1 ,
355
- red: 1 ,
356
- green: 0 ,
357
- blue: 0 ,
358
- colorSpace: ui.ColorSpace .displayP3),
359
- Color .from (
360
- alpha: 1 ,
361
- red: 0 ,
362
- green: 1 ,
363
- blue: 0 ,
364
- colorSpace: ui.ColorSpace .displayP3)],
365
- ),
366
- ),
367
- );
368
- case Setup .conicalGradient:
369
- imageWidget = Container (
370
- width: 100 ,
371
- height: 100 ,
372
- decoration: const BoxDecoration (
373
- gradient: RadialGradient (
374
- focal: Alignment (0.2 , 0.2 ),
375
- colors: < Color > [
376
- Color .from (
377
- alpha: 1 ,
378
- red: 1 ,
379
- green: 0 ,
380
- blue: 0 ,
381
- colorSpace: ui.ColorSpace .displayP3),
382
- Color .from (
383
- alpha: 1 ,
384
- red: 0 ,
385
- green: 1 ,
386
- blue: 0 ,
387
- colorSpace: ui.ColorSpace .displayP3)],
388
- ),
389
- ),
390
- );
391
- case Setup .sweepGradient:
392
- imageWidget = Container (
393
- width: 100 ,
394
- height: 100 ,
395
- decoration: const BoxDecoration (
396
- gradient: SweepGradient (
397
- colors: < Color > [
398
- Color .from (
399
- alpha: 1 ,
400
- red: 1 ,
401
- green: 0 ,
402
- blue: 0 ,
403
- colorSpace: ui.ColorSpace .displayP3),
404
- Color .from (
405
- alpha: 1 ,
406
- red: 0 ,
407
- green: 1 ,
408
- blue: 0 ,
409
- colorSpace: ui.ColorSpace .displayP3)],
410
- ),
411
- ),
412
- );
413
311
}
414
312
415
313
return Scaffold (
0 commit comments