copyWith method
MarkerOptions
copyWith({
- GeoPointWithElevation? position,
- Optional<
Image?> ? icon, - Optional<
MapDirection?> ? iconMapDirection, - Anchor? anchor,
- Optional<
String?> ? text, - Optional<
TextStyle?> ? textStyle, - Opacity? iconOpacity,
- bool? visible,
- bool? draggable,
- LogicalPixel? iconWidth,
- Optional<
Object?> ? userData, - ZIndex? zIndex,
- bool? animatedAppearance,
- Optional<
LevelId?> ? levelId, - AnimationMode? iconAnimationMode,
Implementation
MarkerOptions copyWith({
GeoPointWithElevation? position,
Optional<Image?>? icon,
Optional<MapDirection?>? iconMapDirection,
Anchor? anchor,
Optional<String?>? text,
Optional<TextStyle?>? textStyle,
Opacity? iconOpacity,
bool? visible,
bool? draggable,
LogicalPixel? iconWidth,
Optional<Object?>? userData,
ZIndex? zIndex,
bool? animatedAppearance,
Optional<LevelId?>? levelId,
AnimationMode? iconAnimationMode
}) {
return MarkerOptions(
position: position ?? this.position,
icon: icon != null ? icon.value : this.icon,
iconMapDirection: iconMapDirection != null ? iconMapDirection.value : this.iconMapDirection,
anchor: anchor ?? this.anchor,
text: text != null ? text.value : this.text,
textStyle: textStyle != null ? textStyle.value : this.textStyle,
iconOpacity: iconOpacity ?? this.iconOpacity,
visible: visible ?? this.visible,
draggable: draggable ?? this.draggable,
iconWidth: iconWidth ?? this.iconWidth,
userData: userData != null ? userData.value : this.userData,
zIndex: zIndex ?? this.zIndex,
animatedAppearance: animatedAppearance ?? this.animatedAppearance,
levelId: levelId != null ? levelId.value : this.levelId,
iconAnimationMode: iconAnimationMode ?? this.iconAnimationMode
);
}