FirebaseRtdbChannel constructor

FirebaseRtdbChannel({
  1. required String channelId,
  2. required String path,
  3. FirebaseDatabase? database,
  4. int maxMessages = 100,
})

Creates a FirebaseRtdbChannel.

path is the RTDB path where messages are stored, e.g. 'channels/room1/messages'. maxMessages limits the number of historic messages loaded on connect.

Implementation

FirebaseRtdbChannel({
  required this.channelId,
  required String path,
  FirebaseDatabase? database,
  int maxMessages = 100,
}) : _path = path,
     _db = database ?? FirebaseDatabase.instance,
     _maxMessages = maxMessages;