deserializeColorSequence function

ColorSequence deserializeColorSequence (
  1. Map data
)

Implementation

ColorSequence deserializeColorSequence(Map data) {
  List<int> colorsData = data['colors'].cast<int>();
  List<double> stops = data['colorStops'].cast<double>();
  List<Color> colors = <Color>[];

  for (int i = 0; i < colorsData.length; i++) {
    colors.add(deserializeColor(colorsData[i]));
  }

  return new ColorSequence(colors, stops);
}