CardScanConfig class

Properties and callbacks set to CardScanner

Constructors

CardScanConfig.new({required String sessionToken, required ScanSuccessCallback? onSuccess, CardScanLogLevel logging = CardScanLogLevel.normal, bool live = false, EligibilityRequest? eligibility, EligibilitySuccessCallback? onEligibilitySuccess, EligibilityErrorCallback? onEligibilityError, VoidCallback? onCancel, ErrorCallback? onError, bool backsideSupport = false, VoidCallback? onRetry, CardScanMessages? messages, TextStyle? messageStyle, Color? autoSwitchActiveColor, Color? autoSwitchInactiveColor, Color? progressBarColor, Color? widgetBackgroundColor, VoidCallback? onWebViewLoadError, InternalOptions? internal})
const

Properties

autoSwitchActiveColor Color?
Enabled color for the auto scan switch.
final
autoSwitchInactiveColor Color?
Disabled color for the auto scan switch.
final
backsideSupport bool
Enable scanning of the front and back side of the card.
final
eligibility EligibilityRequest?
Information necessary to run an eligibility check, check out the eligibility docs for more info.
final
hashCode int
The hash code for this object.
no setterinherited
internal InternalOptions?
Internal options for debugging/testing.
final
live bool
Flag for current environment of the card scanner.
final
logging CardScanLogLevel
Flag for choosing the level of detail for logs, choose between off, normal, verbose, detector or everything.
final
messages CardScanMessages?
Custom texts for giving visual feedback inside CardScanner UI.
final
messageStyle TextStyle?
Adjust text properties to the message prompted by the UI.
final
onCancel VoidCallback?
Callback triggered when user cancels/closes the CardScanner UI.
final
onEligibilityError → EligibilityErrorCallback?
Callback triggered when an eligibility check resulted in an error.
final
onEligibilitySuccess → EligibilitySuccessCallback?
Callback triggered when an eligibility check was successful.
final
onError → ErrorCallback?
Callback triggered on potential errors. Errors happend when calling the API or when CardScanner fails to initialize.
final
onRetry VoidCallback?
Callback triggered when a scan fails.
final
onSuccess → ScanSuccessCallback?
Callback on successful card scanning. Returns a ScannedCard object when triggered.
final
onWebViewLoadError VoidCallback?
Callback triggered when we get an error from the webview.
final
progressBarColor Color?
Color for the progress bar and bounding box surrounding the card scan area.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sessionToken String
JWT used for authenticating users during CardScanner API requests.
final
widgetBackgroundColor Color?
Main background color for the widget.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited