$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 'a':
      return $double($value.a);
    case 'r':
      return $double($value.r);
    case 'g':
      return $double($value.g);
    case 'b':
      return $double($value.b);
    case 'colorSpace':
      return $ColorSpace.wrap($value.colorSpace);
    case 'hashCode':
      return $int($value.hashCode);
    case 'toARGB32':
      return __toARGB32;
    case 'withValues':
      return __withValues;
    case 'withAlpha':
      return __withAlpha;
    case 'withRed':
      return __withRed;
    case 'withGreen':
      return __withGreen;
    case 'withBlue':
      return __withBlue;
    case 'computeLuminance':
      return __computeLuminance;
    case 'toString':
      return __toString;
  }
  throw UnimplementedError('property $identifier not generated for Color');
}