Parser
Defined in library scandit_datacapture_parser
- Parser
class Parser : DataCaptureComponent
Added in version 6.10.0
- forContextAndFormat(context, dataFormat)
static Future<Parser> forContextAndFormat( DataCaptureContext context, ParserDataFormat dataFormat)
Added in version 6.10.0
Create new parser for the provided data format and context. The license key with which the data capture context was constructed must have the parser feature enabled.
In case the parser could not be constructed, an exception is raised. Information on why creation failed is contained in the exception error message.
- parseString(data)
Future<ParsedData> parseString(String data)
Added in version 6.10.0
Parses the data string and returns the contained field in the result object. Typical inputs to this method is the data contained in a barcode (see Barcode.data)
In case the data string could not be parsed, an exception is raised. More detailed information on why creation failed is contained in the exception error message.
- parseRawData(data)
Future<ParsedData> parseRawData(String data)
Added in version 6.10.0
Parses the raw data and returns the contained field in the result object. Typical inputs to this method is the raw data of a barcode (see Barcode.rawData).
In case the data string could not be parsed, an exception is raised. More detailed information on why creation failed is contained in the exception error message.
- setOptions(options)
Future<
void
> setOptions(Map<String,dynamic
> options)Added in version 6.10.0
Set the provided options on the parser.
Available options depend on the data format type of the parser and are documented for each of the supported data formats.
In case the options are invalid, an exception is raised. More detailed information on why creation failed is contained in the exception error message.
- id
String get id
Added in version 6.10.0
Implemented from DataCaptureComponent. See DataCaptureComponent.id.
- dispose()
void
dispose()Added in version 6.22.0
Disposes the parser.