get method

  1. @override
Object? get(
  1. Token name
)
override

Implementation

@override
Object? get(Token name) {
  switch (name.lexeme) {
    case 'aspectRatio':
      return aspectRatio;
    case 'isPlaying':
      return isPlaying;
    case 'isLooping':
      return isLooping;
    case 'isBuffering':
      return isBuffering;
    case 'isInitialized':
      return isInitialized;
    case 'caption':
      return CaptionIns(
        caption.number,
        caption.text,
        caption.start,
        caption.end,
      );
    case 'position':
      return position;
    case 'size':
      return SizeIns(size.width, size.height);
    case 'volume':
      return volume;
  }
  throw "Unknown property: ${name.lexeme}";
}