SfMapsThemeData constructor

SfMapsThemeData({
  1. Brightness? brightness,
  2. Color? layerColor,
  3. Color? layerStrokeColor,
  4. double? layerStrokeWidth,
  5. Color? shapeHoverColor,
  6. Color? shapeHoverStrokeColor,
  7. double? shapeHoverStrokeWidth,
  8. TextStyle? legendTextStyle,
  9. Color? markerIconColor,
  10. Color? markerIconStrokeColor,
  11. double? markerIconStrokeWidth,
  12. TextStyle? dataLabelTextStyle,
  13. Color? bubbleColor,
  14. Color? bubbleStrokeColor,
  15. double? bubbleStrokeWidth,
  16. Color? bubbleHoverColor,
  17. Color? bubbleHoverStrokeColor,
  18. double? bubbleHoverStrokeWidth,
  19. Color? selectionColor,
  20. Color? selectionStrokeColor,
  21. double? selectionStrokeWidth,
  22. Color? tooltipColor,
  23. Color? tooltipStrokeColor,
  24. double? tooltipStrokeWidth,
  25. BorderRadiusGeometry? tooltipBorderRadius,
  26. Color? toggledItemColor,
  27. Color? toggledItemStrokeColor,
  28. double? toggledItemStrokeWidth,
})

Returns a new instance of SfMapsThemeData.raw for the given values.

If any of the values are null, the default values will be set.

Implementation

factory SfMapsThemeData({
  Brightness? brightness,
  Color? layerColor,
  Color? layerStrokeColor,
  double? layerStrokeWidth,
  Color? shapeHoverColor,
  Color? shapeHoverStrokeColor,
  double? shapeHoverStrokeWidth,
  TextStyle? legendTextStyle,
  Color? markerIconColor,
  Color? markerIconStrokeColor,
  double? markerIconStrokeWidth,
  TextStyle? dataLabelTextStyle,
  Color? bubbleColor,
  Color? bubbleStrokeColor,
  double? bubbleStrokeWidth,
  Color? bubbleHoverColor,
  Color? bubbleHoverStrokeColor,
  double? bubbleHoverStrokeWidth,
  Color? selectionColor,
  Color? selectionStrokeColor,
  double? selectionStrokeWidth,
  Color? tooltipColor,
  Color? tooltipStrokeColor,
  double? tooltipStrokeWidth,
  BorderRadiusGeometry? tooltipBorderRadius,
  Color? toggledItemColor,
  Color? toggledItemStrokeColor,
  double? toggledItemStrokeWidth,
}) {
  brightness = brightness ?? Brightness.light;
  layerStrokeWidth ??= 1.0;
  markerIconStrokeWidth ??= 1.0;
  bubbleStrokeWidth ??= 1.0;
  selectionStrokeWidth ??= 0.5;
  tooltipStrokeWidth ??= 1.0;
  tooltipBorderRadius ??= const BorderRadius.all(Radius.circular(4.0));

  return SfMapsThemeData.raw(
    brightness: brightness,
    layerColor: layerColor,
    layerStrokeColor: layerStrokeColor,
    shapeHoverColor: shapeHoverColor,
    shapeHoverStrokeColor: shapeHoverStrokeColor,
    legendTextStyle: legendTextStyle,
    markerIconColor: markerIconColor,
    markerIconStrokeColor: markerIconStrokeColor,
    dataLabelTextStyle: dataLabelTextStyle,
    bubbleColor: bubbleColor,
    bubbleStrokeColor: bubbleStrokeColor,
    bubbleStrokeWidth: bubbleStrokeWidth,
    bubbleHoverColor: bubbleHoverColor,
    bubbleHoverStrokeColor: bubbleHoverStrokeColor,
    bubbleHoverStrokeWidth: bubbleHoverStrokeWidth,
    selectionColor: selectionColor,
    selectionStrokeColor: selectionStrokeColor,
    tooltipColor: tooltipColor,
    tooltipStrokeColor: tooltipStrokeColor,
    tooltipStrokeWidth: tooltipStrokeWidth,
    tooltipBorderRadius: tooltipBorderRadius,
    selectionStrokeWidth: selectionStrokeWidth,
    layerStrokeWidth: layerStrokeWidth,
    shapeHoverStrokeWidth: shapeHoverStrokeWidth,
    markerIconStrokeWidth: markerIconStrokeWidth,
    toggledItemColor: toggledItemColor,
    toggledItemStrokeColor: toggledItemStrokeColor,
    toggledItemStrokeWidth: toggledItemStrokeWidth,
  );
}