$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 'data':
      return $value.data == null ? const $null() : $String($value.data!);
    case 'textSpan':
      return $value.textSpan == null
          ? const $null()
          : $InlineSpan.wrap($value.textSpan!);
    case 'style':
      return $value.style == null
          ? const $null()
          : $TextStyle.wrap($value.style!);
    case 'textDirection':
      return $value.textDirection == null
          ? const $null()
          : $TextDirection.wrap($value.textDirection!);
    case 'locale':
      return $value.locale == null
          ? const $null()
          : $Locale.wrap($value.locale!);
    case 'softWrap':
      return $value.softWrap == null
          ? const $null()
          : $bool($value.softWrap!);
    case 'textScaleFactor':
      return $value.textScaleFactor == null
          ? const $null()
          : $double($value.textScaleFactor!);
    case 'maxLines':
      return $value.maxLines == null ? const $null() : $int($value.maxLines!);
    case 'semanticsLabel':
      return $value.semanticsLabel == null
          ? const $null()
          : $String($value.semanticsLabel!);
    case 'semanticsIdentifier':
      return $value.semanticsIdentifier == null
          ? const $null()
          : $String($value.semanticsIdentifier!);
    case 'selectionColor':
      return $value.selectionColor == null
          ? const $null()
          : $Color.wrap($value.selectionColor!);
    case 'build':
      return __build;
    case 'debugFillProperties':
      return __debugFillProperties;
  }
  throw UnimplementedError('property $identifier not generated for Text');
}