MorphSurfaceSpec class

The morph's surface model as a value: everything the engine can interpolate about a surface - (shape, color, elevation). Declared once at a MorphTag (via MorphTag.spec) and readable by any descendant through MorphTag.specOf, so the visible surface is BUILT FROM the declaration instead of duplicating it - drift between "what the button looks like" and "what the morph believes" becomes structurally impossible, whatever rendering stack draws it.

Being a plain value, specs compose with any storage the app already has: its own ThemeExtension of named archetypes, constants, or inline.

Annotations

Constructors

MorphSurfaceSpec({ShapeBorder shape = const RoundedRectangleBorder(), Color? color, double elevation = 0})
Creates a surface model.
const

Properties

color Color?
The surface color; null lets the consumer pick a scheme default.
final
elevation double
The surface shadow.
final
hashCode int
The hash code for this object.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shape ShapeBorder
The surface outline.
final

Methods

copyWith({ShapeBorder? shape, Color? color, double? elevation}) MorphSurfaceSpec
A copy with the given fields replaced.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override