getByOid method

Future<Map<String, Object?>?> getByOid(
  1. ObjectId? oid
)

Implementation

Future<Map<String, Object?>?> getByOid(ObjectId? oid) async {
  if (oid == null || !await existOid(oid)) {
    return null;
  }

  var res = await collection.findOne(where.id(oid));
  if (res != null) {
    return await toModel(res);
  }
  return null;
}