copyWith method
Creates a copy of this theme with the specified properties replaced.
All parameters are optional. If a parameter is not provided, the corresponding property from the current theme is used.
Example:
final baseTheme = AnnotationTheme.light;
final customTheme = baseTheme.copyWith(
selectionBorderColor: Colors.purple,
borderWidth: 3.0,
);
Implementation
AnnotationTheme copyWith({
Color? selectionBorderColor,
Color? selectionBackgroundColor,
Color? highlightBorderColor,
Color? highlightBackgroundColor,
double? borderWidth,
double? highlightBorderWidthDelta,
BorderRadius? borderRadius,
}) {
return AnnotationTheme(
selectionBorderColor: selectionBorderColor ?? this.selectionBorderColor,
selectionBackgroundColor:
selectionBackgroundColor ?? this.selectionBackgroundColor,
highlightBorderColor: highlightBorderColor ?? this.highlightBorderColor,
highlightBackgroundColor:
highlightBackgroundColor ?? this.highlightBackgroundColor,
borderWidth: borderWidth ?? this.borderWidth,
highlightBorderWidthDelta:
highlightBorderWidthDelta ?? this.highlightBorderWidthDelta,
borderRadius: borderRadius ?? this.borderRadius,
);
}