$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 'sourceTimeStamp':
      final sourceTimeStamp = $value.sourceTimeStamp;
      if (sourceTimeStamp == null) {
        return const $null();
      }
      return $Duration.wrap(sourceTimeStamp);
    case 'delta':
      return $Offset.wrap($value.delta);
    case 'primaryDelta':
      final primaryDelta = $value.primaryDelta;
      if (primaryDelta == null) {
        return const $null();
      }
      return $double(primaryDelta);
    case 'globalPosition':
      return $Offset.wrap($value.globalPosition);
    case 'localPosition':
      return $Offset.wrap($value.localPosition);
    default:
      return _superclass.$getProperty(runtime, identifier);
  }
}