addTask static method

Future<void> addTask(
  1. String barcode,
  2. LocalDatabase localDatabase
)

Implementation

static Future<void> addTask(
  String barcode,
  LocalDatabase localDatabase,
) async {
  final String uniqueId = await _operationType.getNewKey(
    localDatabase,
    barcode: barcode,
  );
  final BackgroundTask task = _getNewTask(uniqueId, barcode);
  await task.addToManager(localDatabase, queue: BackgroundTaskQueue.fast);
}