copyWith method

GlobeRegion copyWith({
  1. String? id,
  2. String? name,
  3. List<List<List<List<double>>>>? polygons,
  4. Color? borderColor,
  5. double? borderWidth,
  6. Color? fillColor,
  7. Color? highlightColor,
  8. bool? isVisible,
  9. List<String>? clipAgainst,
  10. bool clearFillColor = false,
  11. bool clearHighlightColor = false,
})

Implementation

GlobeRegion copyWith({
  String? id,
  String? name,
  List<List<List<List<double>>>>? polygons,
  Color? borderColor,
  double? borderWidth,
  Color? fillColor,
  Color? highlightColor,
  bool? isVisible,
  List<String>? clipAgainst,
  bool clearFillColor = false,
  bool clearHighlightColor = false,
}) {
  return GlobeRegion(
    id: id ?? this.id,
    name: name ?? this.name,
    polygons: polygons ?? this.polygons,
    borderColor: borderColor ?? this.borderColor,
    borderWidth: borderWidth ?? this.borderWidth,
    fillColor: clearFillColor ? null : (fillColor ?? this.fillColor),
    highlightColor:
        clearHighlightColor ? null : (highlightColor ?? this.highlightColor),
    isVisible: isVisible ?? this.isVisible,
    clipAgainst: clipAgainst ?? this.clipAgainst,
  );
}