count<T extends Model> static method

Future<int> count<T extends Model>()

Counts total records.

Implementation

static Future<int> count<T extends Model>() async {
  try {
    return await jsonIndex<T>().then((records) => records.length);
  } catch (e) {
    return 0;
  }
}