getNewKey method

Future<String> getNewKey(
  1. LocalDatabase localDatabase, {
  2. String? barcode = BackgroundTaskProgressing.noBarcode,
  3. int? totalSize,
  4. int? soFarSize,
  5. String? work,
  6. ProductType? productType,
})

Implementation

Future<String> getNewKey(
  LocalDatabase localDatabase, {
  String? barcode = BackgroundTaskProgressing.noBarcode,
  int? totalSize,
  int? soFarSize,
  String? work,
  ProductType? productType,
}) async {
  final int sequentialId = await DaoInt(
    localDatabase,
  ).getNextSequenceNumber(_uniqueSequenceKey);
  return '$header'
      '$_transientHeaderSeparator$sequentialId'
      '$_transientHeaderSeparator$barcode'
      '$_transientHeaderSeparator${totalSize == null ? '' : totalSize.toString()}'
      '$_transientHeaderSeparator${soFarSize == null ? '' : soFarSize.toString()}'
      '$_transientHeaderSeparator${work ?? ''}'
      '$_transientHeaderSeparator${productType == null ? '' : productType.offTag}';
}