$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 'text':
      final _text = $value.text;
      return $String(_text);

    case 'selection':
      final _selection = $value.selection;
      return runtime.wrapAlways(_selection);

    case 'composing':
      final _composing = $value.composing;
      return $TextRange.wrap(_composing);

    case 'isComposingRangeValid':
      final _isComposingRangeValid = $value.isComposingRangeValid;
      return $bool(_isComposingRangeValid);
    case 'copyWith':
      return __copyWith;

    case 'replaced':
      return __replaced;

    case 'toJSON':
      return __toJSON;
  }
  return _superclass.$getProperty(runtime, identifier);
}