get method

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

Implementation

@override
Object? get(Token name) {
  switch (name.lexeme) {
    case 'data':
      return snapshot.data;
    case 'error':
      return snapshot.error;
    case 'hasError':
      return snapshot.hasError;
    case 'hasData':
      return snapshot.hasData;
    case 'connectionState':
      return snapshot.connectionState;
  }
  throw "Unknown property: ${name.lexeme}";
}