collection<T> method
Returns a reference to the named collection.
The default idField is _id. You may change it if needed.
The optional fromJson converter is used to map document JSON to
strongly typed values when queries are executed.
Implementation
RealtimeCollectionReference<T> collection<T>(
String name, {
FromJson<T>? fromJson,
String? idField,
}) {
return RealtimeCollectionReference<T>(
client: this,
name: name,
fromJson: fromJson,
idField: idField,
);
}