deleteBatchLocations method

Future<void> deleteBatchLocations(
  1. List<int> ids
)

Implementation

Future<void> deleteBatchLocations(List<int> ids) async {
  if (ids.isEmpty) return;
  final db = await database;
  try {
    final placeholders = ids.map((_) => '?').join(',');
    await db.delete(
      'locations',
      where: 'id IN ($placeholders)',
      whereArgs: ids,
    );
  } catch (e) {
    debugPrint('BeTracky DB delete error: $e');
  }
}