DataColorPalette.fromJson constructor

DataColorPalette.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory DataColorPalette.fromJson(Map<String, dynamic> json) {
  return DataColorPalette(
    colors: (json['Colors'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
    emptyFillColor: json['EmptyFillColor'] as String?,
    minMaxGradient: (json['MinMaxGradient'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
  );
}