totalUsage static method

Future<int> totalUsage(
  1. String stateId
)

Read the total usage count (for social proof).

Implementation

static Future<int> totalUsage(String stateId) async {
  final doc = await _col.doc(stateId).get();
  return (doc.data()?['total'] as int?) ?? 0;
}