PropType.variable constructor

const PropType.variable(
  1. PropType variableOf
)

A variable parameter of a component (Flutter: a ValueNotifier<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, and variableOf is the variable's own type.

Implementation

const PropType.variable(PropType this.variableOf)
  : kind = PropKind.string,
    name = 'ValueNotifier',
    values = const [],
    item = null,
    _fields = null,
    _spec = null,
    min = null,
    max = null;