babincc / flutter_workshop

This repo houses add-ons, plug-ins, and helpful code to make Flutter programming easier.
5 stars 1 forks source link

Make shortcuts for properties #7

Open babincc opened 1 year ago

babincc commented 1 year ago

For example, rather than calling

LightColorXy red = myLight.color.gamut.red;
LightColorXy green = myLight.color.gamut.green;
LightColorXy blue = myLight.color.gamut.blue;

you could instead call

List<LightColorXy> rgb = myLight.rgb;
LightColorXy red = rgb[0];
LightColorXy green = rgb[1];
LightColorXy blue = rgb[2];