Skip to content

Commit 6b2a2bd

Browse files
committed
Merge branch 'console-template-develop' of https://github.com/egovernments/health-campaign-field-worker-app into console-template-develop
2 parents 53757aa + 0dc9c4a commit 6b2a2bd

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/digit_flow_builder/lib/action_handler/executors/open_scanner_executor.dart

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,10 @@ class OpenScannerExecutor extends ActionExecutor {
4545
final scanType = properties['scanType'] as String? ?? 'qr';
4646
final fieldName = properties['fieldName'] as String? ?? 'scannedData';
4747
final singleValue = properties['singleValue'] as bool? ?? true;
48-
final quantity = properties['scanLimit'] as int? ?? 1;
48+
final scanLimit = properties['scanLimit'];
49+
final quantity = scanLimit is String
50+
? (int.tryParse(scanLimit) ?? 1)
51+
: (scanLimit as int? ?? 1);
4952
final isGS1code = properties['isGS1'] as bool? ?? false;
5053

5154
// Get onSuccess and onError actions
@@ -58,7 +61,7 @@ class OpenScannerExecutor extends ActionExecutor {
5861
final screenKey = crudCtx?.screenKey ?? getScreenKeyFromArgs(context);
5962

6063
// Get composite key for FlowCrudStateRegistry operations
61-
final compositeKey = getCompositeKey(context, screenKey: screenKey);
64+
final compositeKey = getCompositeKey(context, screenKey: screenKey);
6265

6366
try {
6467
final scannerBloc = context.read<DigitScannerBloc>();

0 commit comments

Comments
 (0)