fields method

RealtimeObserver<T> fields(
  1. List<String> fields
)

Set field projection for the subscription

Example

realtime.observe<User>('users.updates')
  ..fields(['name', 'email'])
  ..on('data', (topic, user) {
    print('User updated: ${user.name}');
  });

Implementation

RealtimeObserver<T> fields(List<String> fields) {
  _fields = fields;
  return this;
}