Flutter – 'value' is deprecated and shouldn't be used. Use component accessors like .r or .g
extension MaterialCode on Color { MaterialColor toMaterialColor() { final List<double> strengths = <double>[.05]; final Map<int, Color> swatch = {}; for (var i = 1; i < 10; i++) { strengths.add(0.1 * i); } for (final strength in strengths) { final…