PropType class final
What a prop holds (see PropKind). Pure data, read from a codec (PropCodec.type); a prop is nullable when its default is null (PropDef.nullable).
- Annotations
-
- @immutable
Constructors
- PropType.boolean()
-
const
-
PropType.enumeration(String name, List<
String> values) -
An enum: its Flutter name and its values' names.
const
- PropType.integer({num? min, num? max})
-
const
- PropType.json([String name = 'Object'])
-
const
- PropType.list(PropType item)
-
A list; name is the item's Flutter type (the list's is typeName).
const
- PropType.number({num? min, num? max})
-
const
-
PropType.object(String name, List<
PropDef< fields())Object?> > -
A model of declared fields.
fieldsis a function so a model can contain itself (a paint's image) and declarations can be cyclic.const - PropType.record(String name, WidgetSpec spec)
-
A model declared as a WidgetSpec of fields (a record).
const
- PropType.string()
-
const
- PropType.value(String name)
-
A Flutter value type with a JSON form of its own (PropKind.value).
const
Properties
-
fields
→ List<
PropDef< Object?> > -
The fields of a PropKind.object (empty for other kinds).
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- item → PropType?
-
The item type of a PropKind.list.
final
- kind → PropKind
-
final
- max → num?
-
Bounds of a number (inclusive).
final
- min → num?
-
Bounds of a number (inclusive).
final
- name → String
-
The Flutter type name (
Listfor lists: see typeName).final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- typeName → String
-
The full Flutter type name (
List<Paint>).no setter -
values
→ List<
String> -
The value names of an PropKind.enumeration.
final
Methods
-
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.
inherited