mergeAndBlend static method
DrawableStyle
mergeAndBlend(
- DrawableStyle? parent, {
- DrawablePaint? fill,
- DrawablePaint? stroke,
- CircularIntervalList<
double> ? dashArray, - DashOffset? dashOffset,
- DrawableTextStyle? textStyle,
- PathFillType? pathFillType,
- double? groupOpacity,
- List<
Path> ? clipPath, - DrawableStyleable? mask,
- BlendMode? blendMode,
Creates a new DrawableStyle if parent
is not null, filling in any null
properties on this with the properties from other (except groupOpacity
,
is not inherited).
Implementation
static DrawableStyle mergeAndBlend(
DrawableStyle? parent, {
DrawablePaint? fill,
DrawablePaint? stroke,
CircularIntervalList<double>? dashArray,
DashOffset? dashOffset,
DrawableTextStyle? textStyle,
PathFillType? pathFillType,
double? groupOpacity,
List<Path>? clipPath,
DrawableStyleable? mask,
BlendMode? blendMode,
}) {
return DrawableStyle(
fill: DrawablePaint.merge(fill, parent?.fill),
stroke: DrawablePaint.merge(stroke, parent?.stroke),
dashArray: dashArray ?? parent?.dashArray,
dashOffset: dashOffset ?? parent?.dashOffset,
textStyle: DrawableTextStyle.merge(textStyle, parent?.textStyle),
pathFillType: pathFillType ?? parent?.pathFillType,
groupOpacity: groupOpacity,
// clips don't make sense to inherit - applied to canvas with save/restore
// that wraps any potential children
clipPath: clipPath,
mask: mask,
blendMode: blendMode,
);
}