Palette.fromJson constructor

Palette.fromJson(
  1. List<String> json
)

Creates a new palette from JSON.

Implementation

factory Palette.fromJson(List<String> json) {
  var components = json.map((c) => Color(int.tryParse(c))).toList();
  return Palette(components: components);
}