from property

double from

Sets the range start for the color mapping.

The shape or bubble will render in the specified color if the value returned in the MapShapeLayerDelegate.shapeColorValueMapper or MapShapeLayerDelegate.bubbleColorValueMapper falls between the from and to range.

List<Model> data;

 void initState() {

   data = <Model>[
    Model('India', 100, "Low"),
    Model('United States of America', 200, "High"),
    Model('Pakistan', 75, "Low"),

 Widget build(BuildContext context) {
   return SfMaps(
     layers: [
         delegate: MapShapeLayerDelegate(
             shapeFile: "assets/world_map.json",
             shapeDataField: "name",
             dataCount: data.length,
             primaryValueMapper: (index) {
               return data[index].country;
             shapeColorValueMapper: (index) {
               return data[index].count;
             shapeColorMappers: [
               MapColorMapper(from: 0, to:  100, color:,
               MapColorMapper(from: 101, to: 200, color: Colors.yellow)

See also:


final double from