$getProperty method

  1. @override
$Value? $getProperty(
  1. Runtime runtime,
  2. String identifier
)

Get a property by identifier on this instance

Implementation

@override
$Value? $getProperty(Runtime runtime, String identifier) {
  switch (identifier) {
    case 'label':
      return $String($value.label);

    case 'icon':
      final _icon = $value.icon;
      return _icon == null ? const $null() : $IconData.wrap(_icon);

    case 'key':
      final _key = $value.key;
      return _key == null ? const $null() : runtime.wrapAlways(_key);

    case 'isDefaultAction':
      return $bool($value.isDefaultAction);

    case 'isDestructiveAction':
      return $bool($value.isDestructiveAction);

    case 'textStyle':
      return $TextStyle.wrap($value.textStyle);
  }
  return _superclass.$getProperty(runtime, identifier);
}