Implementation
Map<String, String> get map {
final List<String> possibleNamePositions = [];
if (possibleCardHolderNamePositions
.contains(CardHolderNameScanPosition.belowCardNumber))
possibleNamePositions.add('belowCardNumber');
if (possibleCardHolderNamePositions
.contains(CardHolderNameScanPosition.aboveCardNumber))
possibleNamePositions.add('aboveCardNumber');
return {
'scanExpiryDate': scanExpiryDate.toString(),
'scanCardHolderName': scanCardHolderName.toString(),
'initialScansToDrop': initialScansToDrop.toString(),
'validCardsToScanBeforeFinishingScan':
validCardsToScanBeforeFinishingScan.toString(),
'cardHolderNameBlackListedWords':
cardHolderNameBlackListedWords.join(","),
'considerPastDatesInExpiryDateScan':
considerPastDatesInExpiryDateScan.toString(),
'maxCardHolderNameLength': maxCardHolderNameLength.toString(),
'enableLuhnCheck': enableLuhnCheck.toString(),
'cardScannerTimeOut': cardScannerTimeOut.toString(),
'enableDebugLogs': enableDebugLogs.toString(),
'possibleCardHolderNamePositions': possibleNamePositions.join(",")
};
}