BMFGradient.fromMap constructor
- Map map
map => BMFGradient
Implementation
BMFGradient.fromMap(Map map)
: assert(map != null,
'Construct a BMFGradient,The parameter map cannot be null') {
if (map['colors'] != null) {
colors = new List<Color>();
map['colors'].forEach((v) {
colors.add(ColorUtil.hexToColor(v as String));
});
}
if (map['startPoints'] != null) {
startPoints = new List<double>();
map['startPoints'].forEach((v) {
startPoints.add(v as double);
});
}
}