copyWith method

MarkerOptions copyWith({
  1. GeoPointWithElevation? position,
  2. Optional<Image?>? icon,
  3. Optional<MapDirection?>? iconMapDirection,
  4. Anchor? anchor,
  5. Optional<String?>? text,
  6. Optional<TextStyle?>? textStyle,
  7. Opacity? iconOpacity,
  8. bool? visible,
  9. bool? draggable,
  10. LogicalPixel? iconWidth,
  11. Optional<Object?>? userData,
  12. ZIndex? zIndex,
  13. bool? animatedAppearance,
  14. Optional<LevelId?>? levelId,
  15. 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
  );
}