SfMapsThemeData class Null safety

Holds the color and typography values for a SfMapsTheme. Use this class to configure a SfMapsTheme widget, or to set the SfThemeData.mapsThemeData for a SfTheme widget.

To obtain the current theme, use SfMapsTheme.of.

The maps elements are,

  • The "data labels", to provide information to users about the respective shape.
  • The "markers", which denotes a location with built-in symbols and allows displaying custom widgets at a specific latitude and longitude on a map.
  • The "bubbles", which adds information to shapes such as population density, number of users, and more. Bubbles can be rendered in different colors and sizes based on the data values of their assigned shape.
  • The "legend", to provide clear information on the data plotted in the map. You can use the legend toggling feature to visualize only the shapes to which needs to be visualized.
  • The "color mapping", to categorize the shapes on a map by customizing their color based on the underlying value. It is possible to set the shape color for a specific value or for a range of values.
  • The "tooltip", to display additional information about shapes and bubbles using the customizable tooltip on a map.

See also:

Widget build(BuildContext context) {
  return Scaffold(
    body: SfMapsTheme(
      data: SfMapsThemeData(
        brightness: Brightness.dark,
      ),
      child: SfMaps()
    ),
  );
}
Mixed in types
Annotations

Constructors

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})
Returns a new instance of SfMapsThemeData.raw for the given values. [...]
factory
SfMapsThemeData.raw({required Brightness brightness, required Color layerColor, required Color layerStrokeColor, required double layerStrokeWidth, required Color? shapeHoverColor, required Color? shapeHoverStrokeColor, required double? shapeHoverStrokeWidth, required TextStyle? legendTextStyle, required Color markerIconColor, required Color? markerIconStrokeColor, required double markerIconStrokeWidth, required TextStyle? dataLabelTextStyle, required Color bubbleColor, required Color bubbleStrokeColor, required double bubbleStrokeWidth, required Color? bubbleHoverColor, required Color? bubbleHoverStrokeColor, required double? bubbleHoverStrokeWidth, required Color selectionColor, required Color selectionStrokeColor, required double selectionStrokeWidth, required Color tooltipColor, required Color? tooltipStrokeColor, required double tooltipStrokeWidth, required BorderRadiusGeometry tooltipBorderRadius, required Color toggledItemColor, required Color toggledItemStrokeColor, required double? toggledItemStrokeWidth})
Create a SfMapsThemeData given a set of exact values. All the values must be specified. [...]
const

Properties

brightness Brightness
The brightness of the overall theme of the application for the maps widgets. [...]
final
bubbleColor Color
Specifies the fill color for bubble. [...]
final
bubbleHoverColor Color?
Specifies the color which should apply on the bubbles while hovering in the web platform. [...]
final
bubbleHoverStrokeColor Color?
Specifies the color which should apply on the stroke of the bubbles while hovering in the web platform. [...]
final
bubbleHoverStrokeWidth double?
Specifies the stroke which should apply on the stroke of the bubbles while hovering in the web platform. [...]
final
bubbleStrokeColor Color
Specifies the stroke color for bubble. [...]
final
bubbleStrokeWidth double
Specifies the stroke width for bubble. [...]
final
dataLabelTextStyle TextStyle?
Specifies the TextStyle for data label. [...]
final
hashCode int
The hash code for this object. [...]
read-only, override
layerColor Color
Specifies the fill color for maps layer. [...]
final
layerStrokeColor Color
Specifies the stroke color for maps layer. [...]
final
layerStrokeWidth double
Specifies the stroke width for maps layer. [...]
final
legendTextStyle TextStyle?
Specifies the text style of the legend. [...]
final
markerIconColor Color
Specifies the fill color for marker icon. [...]
final
markerIconStrokeColor Color?
Specifies the stroke color for marker icon. [...]
final
markerIconStrokeWidth double
Specifies the stroke width for marker icon. [...]
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
selectionColor Color
Specifies the fill color for selected shape. [...]
final
selectionStrokeColor Color
Specifies the stroke color for selected shape. [...]
final
selectionStrokeWidth double
Specifies the stroke width for selected shape. [...]
final
shapeHoverColor Color?
Specifies the color which should apply on the shapes while hovering in the web platform. [...]
final
shapeHoverStrokeColor Color?
Specifies the color which should apply on the stroke of the shapes while hovering in the web platform. [...]
final
shapeHoverStrokeWidth double?
Specifies the stroke which should apply on the stroke of the shapes while hovering in the web platform. [...]
final
toggledItemColor Color
Fills the toggled legend item's icon and the respective shape or bubble by this color. [...]
final
toggledItemStrokeColor Color
Stroke color for the toggled legend item's respective shape or bubble. [...]
final
toggledItemStrokeWidth double?
Stroke width for the toggled legend item's respective shape or bubble. [...]
final
tooltipBorderRadius BorderRadiusGeometry
Specifies the border radius of the tooltip. [...]
final
tooltipColor Color
Specifies the fill color for tooltip. [...]
final
tooltipStrokeColor Color?
Specifies the stroke color for tooltip. [...]
final
tooltipStrokeWidth double
Specifies the stroke width for tooltip. [...]
final

Methods

copyWith({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}) SfMapsThemeData
Creates a copy of this theme but with the given fields replaced with the new values.
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node. [...]
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep. [...]
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object. [...]
inherited
toStringShort() String
A brief description of this object, usually just the runtimeType and the hashCode. [...]
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
override

Static Methods

lerp(SfMapsThemeData? a, SfMapsThemeData? b, double t) SfMapsThemeData?
Linearly interpolate between two themes. [...]