requestScanStart method

Starts a scanning session.

Resolves with the lifecycle response when the session ends (success / failure / abort). Intermediate scan results and UI element click events arrive via onScanResults and onUIElementClicked.

Implementation

Future<WrapperSessionScanResponse> requestScanStart(
    WrapperSessionScanStartRequest request) async {
  await _wrapperSessionSetup;
  final String? resultJson = await _channel.invokeMethod(
      _methodRequestScanStart, {_extraRequest: request.toRawJson()});
  return WrapperSessionScanResponse.fromRawJson(resultJson!);
}