$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 'scriptCode':
      final scriptCode = $value.scriptCode;
      return scriptCode == null ? const $null() : $String(scriptCode);

    case 'languageCode':
      return $String($value.languageCode);

    case 'countryCode':
      final countryCode = $value.countryCode;
      return countryCode == null ? const $null() : $String(countryCode);

    case 'toLanguageTag':
      return __toLanguageTag;
  }
  throw UnimplementedError();
}