Parser
Defined in library scandit_datacapture_parser
- Parser
class Parser : DataCaptureComponent
Added in version 6.10.0
- create(dataFormat)
static Future<Parser> create(ParserDataFormat dataFormat)
Added in version 7.6.0
Construct a new Parser instance with the provided dataFormat.
In case the parser could not be constructed, an exception is raised. Information on why creation failed is contained in the exception error message.
Deprecated since version 7.6: This static function has been deprecated in favour of the new static function create().
- 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()
voiddispose()Added in version 6.22.0
Disposes the parser.