fromSnapshot abstract method

T fromSnapshot(
  1. DocumentSnapshot<Map<String, dynamic>> snapshot,
  2. SnapshotOptions? options
)

Returns a T (of DBModel) when a snapshot is given. Can return null if the snapshot is in bad format.

If it is going to return a DBModel, DBModel.ref should always be not null.

Implementation

T fromSnapshot(
  DocumentSnapshot<Map<String, dynamic>> snapshot,
  SnapshotOptions? options,
);