copyWith method

SimpleClusterOptions copyWith({
  1. Optional<Image?>? icon,
  2. Optional<MapDirection?>? iconMapDirection,
  3. Anchor? anchor,
  4. Optional<String?>? text,
  5. Optional<TextStyle?>? textStyle,
  6. Opacity? iconOpacity,
  7. LogicalPixel? iconWidth,
  8. Optional<Object?>? userData,
  9. ZIndex? zIndex,
  10. bool? animatedAppearance,
  11. AnimationMode? iconAnimationMode,
})

Implementation

SimpleClusterOptions copyWith({
  Optional<Image?>? icon,
  Optional<MapDirection?>? iconMapDirection,
  Anchor? anchor,
  Optional<String?>? text,
  Optional<TextStyle?>? textStyle,
  Opacity? iconOpacity,
  LogicalPixel? iconWidth,
  Optional<Object?>? userData,
  ZIndex? zIndex,
  bool? animatedAppearance,
  AnimationMode? iconAnimationMode
}) {
  return SimpleClusterOptions(
    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,
    iconWidth: iconWidth ?? this.iconWidth,
    userData: userData != null ? userData.value : this.userData,
    zIndex: zIndex ?? this.zIndex,
    animatedAppearance: animatedAppearance ?? this.animatedAppearance,
    iconAnimationMode: iconAnimationMode ?? this.iconAnimationMode
  );
}