CanvasAppearance class abstract
Authored appearance shared by path, text, and icon sources.
foreground controls whether/how the authored source itself is painted.
CanvasFill.none() is valid: the source silhouette still exists and may be
consumed by underlays.
Underlays are painted back-to-front before the foreground. A configured stroke is painted after the foreground where the node supports it.
Paths support stroke but not underlays. Text and icons support underlays but not stroke. Scene validation reports unsupported combinations.
- Annotations
-
- @freezed
Constructors
-
CanvasAppearance({@CanvasFillConverter.new() @Default.new(CanvasFill.solid(0xFF111111)) CanvasFill foreground, CanvasStroke? stroke, @Default.new(<CanvasSourceUnderlay>[]) List<
CanvasSourceUnderlay> underlays}) -
constfactory
-
CanvasAppearance.fromJson(Map<
String, dynamic> json) -
factory
Properties
-
copyWith
→ $CanvasAppearanceCopyWith<
CanvasAppearance> -
Create a copy of CanvasAppearance
with the given fields replaced by the non-null parameter values.
no setterinherited
- foreground → CanvasFill
-
no setterinherited
- hashCode → Color32
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stroke → CanvasStroke?
-
Null means no configured stroke; invisible configurations are retained.
no setterinherited
-
underlays
→ List<
CanvasSourceUnderlay> -
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Serializes this CanvasAppearance to a JSON map.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited