Props class final

A widget's prop values: only the ones that differ from Flutter's defaults are held. Keys a declaration doesn't know round-trip untouched.

Annotations
  • @immutable

Properties

hashCode → int
The hash code for this object.
no setteroverride
isEmpty → bool
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
unknown → Json
Keys no declaration knows (kept for round trips).
no setter

Methods

get<T>(PropDef<T> def) → T
The value of def (its default when unset).
has(PropDef<Object?> def) → bool
Whether def holds a non-default value.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
set<T>(PropDef<T> def, T value) → Props
These props with def set to value, held as def's declared type (PropDef.coerce).
toJson(WidgetSpec? spec) → Json
toString() → String
A string representation of this object.
override

Operators

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

Static Methods

fromJson(WidgetSpec? spec, Object? json) → Props

Constants

empty → const Props