getPendingCount method

Future<int> getPendingCount()

Get count of pending locations

Implementation

Future<int> getPendingCount() async {
  if (_database == null) {
    await initialize();
  }

  final result = await _database!.rawQuery('SELECT COUNT(*) as count FROM $_tableName WHERE synced = 0');

  return Sqflite.firstIntValue(result) ?? 0;
}