withChange method
TipStyle
withChange({
- Color? fillColor,
- Color? strokeColor,
- double? strokeWidth,
- Color? backgroundStrokeColor,
- double? backgroundStrokeWidth,
- List<
Color> ? fillColors, - List<
Color> ? strokeColors, - List<
Color> ? backgroundStrokeColors,
override
Implementation
@override
TipStyle withChange({
Color? fillColor,
Color? strokeColor,
double? strokeWidth,
Color? backgroundStrokeColor,
double? backgroundStrokeWidth,
// The following arguments aren't actually used
List<Color>? fillColors,
List<Color>? strokeColors,
List<Color>? backgroundStrokeColors,
}) {
var _fillColor = fillColor ?? fillColors?.first ?? TRANSPARENT;
var _strokeColor = strokeColor ?? strokeColors?.first ?? TRANSPARENT;
var _strokeWidth = strokeWidth ?? this.strokeWidth;
var _backgroundStrokeColor =
backgroundStrokeColor ?? backgroundStrokeColors?.first ?? TRANSPARENT;
var _backgroundStrokeWidth =
backgroundStrokeWidth ?? this.backgroundStrokeWidth;
return TipStyle(
fillColor: _fillColor,
strokeColor: _strokeColor,
strokeWidth: _strokeWidth,
backgroundStrokeColor: _backgroundStrokeColor,
backgroundStrokeWidth: _backgroundStrokeWidth,
);
}