Stream<Database> get onAddDatabase => _client.onEvent .where((event) => event.name == 'Database.addDatabase') .map((event) => Database.fromJson( event.parameters['database'] as Map<String, dynamic>));