StyleRule.lightness constructor Null safety

  1. int lightness

(a floating point value between -100 and 100) indicates the percentage change in brightness of the element. Negative values increase darkness (where -100 specifies black) while positive values increase brightness (where +100 specifies white).

Note: This option sets the lightness while keeping the saturation and hue specified in the default Google style (or in other style options you define on the map). The resulting color is relative to the style of the base map. If Google makes any changes to the base map style, the changes affect your map's features styled with lightness. It's better to use the absolute color styler if you can.


StyleRule.lightness(int lightness)
    : assert(
        lightness >= -100 && lightness <= 100,
        "lightness argument must be in range -100 to 100",
      _key = "lightness",
      _value = lightness.toString();