addTask static method
Implementation
static Future<void> addTask({
required LocalDatabase localDatabase,
required String work,
required int pageSize,
required int totalSize,
required int soFarSize,
required ProductType productType,
int pageNumber = 1,
}) async {
final String uniqueId = await _operationType.getNewKey(
localDatabase,
totalSize: totalSize,
soFarSize: soFarSize,
productType: productType,
);
final BackgroundTask task = _getNewTask(
uniqueId,
work,
pageSize,
totalSize,
pageNumber,
productType,
);
await task.addToManager(localDatabase, queue: BackgroundTaskQueue.longHaul);
}