countLocations method

Future<int> countLocations()

Implementation

Future<int> countLocations() async {
  final db = await database;
  final result = await db.rawQuery('SELECT COUNT(*) as count FROM locations');
  return (result.first['count'] as int?) ?? 0;
}