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
- PropType.variable(PropType variableOf)
-
A
variableparameter of a component (Flutter: aValueNotifier<T>passed in): the call names a variable of its scope ("menuOpen"), the definition reads it live (${props.menuOpen}) and writes it (setVariable "props.menuOpen"). Its JSON is{"kind": "variable", "of": {...}}; kind is PropKind.string (the name), so a panel that switches over the kinds offers a text field, andvariableOfis the variable's own type.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
- isVariable → bool
-
Whether this is a PropType.variable (its value is a variable's name).
no setter
- 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
- variableOf → PropType?
-
The type of the variable a PropType.variable parameter names; null
for every other type.
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