MarkerConfig class
Configuration for marker appearance and behavior
Constructors
- MarkerConfig({required MarkerType type, Color color = Colors.blue, double size = 30.0, bool enableShadow = true, String? svgPath, String? pngAssetPath, Color borderColor = Colors.white, double borderWidth = 2.0, double opacity = 1.0, double rotation = 0.0, int zIndex = 0, String? label, Color labelColor = Colors.white, double labelFontSize = 12.0, Color? labelBackgroundColor, double anchorX = 0.5, double anchorY = 0.5})
-
const
Properties
- anchorX → double
-
Horizontal anchor (0.0=left, 0.5=center, 1.0=right)
final
- anchorY → double
-
Vertical anchor (0.0=top, 0.5=center, 1.0=bottom)
final
- borderColor → Color
-
Border/Stroke color (for SVG)
final
- borderWidth → double
-
Border/Stroke width (for SVG)
final
- cacheKey → String
-
Generates a unique cache key for this configuration
no setter
- color → Color
-
Primary color of the marker (for SVG)
final
- enableShadow → bool
-
Whether to render a shadow below the marker
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- label → String?
-
Optional label text to display
final
- labelBackgroundColor → Color?
-
Label background color (null for transparent)
final
- labelColor → Color
-
Label text color
final
- labelFontSize → double
-
Label font size
final
- opacity → double
-
Opacity of the marker (0.0 to 1.0)
final
- pngAssetPath → String?
-
PNG asset path (required when type is pngAsset)
Format: Asset path (e.g., "assets/images/marker.png")
final
- rotation → double
-
Rotation angle in degrees (0 is pointing up)
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- size → double
-
Size of the marker in logical pixels
final
- svgPath → String?
-
Custom SVG path data (required when type is svgCustom)
Format: Standard SVG path string (e.g., "M10,10 L20,20...")
final
- type → MarkerType
-
The visual style of the marker
final
- zIndex → int
-
Z-index for layering (higher = drawn on top)
final
Methods
-
copyWith(
{MarkerType? type, Color? color, double? size, bool? enableShadow, String? svgPath, String? pngAssetPath, Color? borderColor, double? borderWidth, double? opacity, double? rotation, int? zIndex, String? label, Color? labelColor, double? labelFontSize, Color? labelBackgroundColor, double? anchorX, double? anchorY}) → MarkerConfig - Creates a copy with modified fields
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toMap(
) → Map< String, dynamic> - Converts the configuration to a map for serialization
-
toString(
) → String -
A string representation of this object.
inherited
-
validate(
) → void - Validates the configuration
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override