getById method

Future<T?> getById(
  1. int id
)

Implementation

Future<T?> getById(int id) async {
  var map = await _collection.getById(id);
  if(map == null) return null;
  return fromJson.call(map);
}