Scandit AR functionality on Flutter does not show anything

I'm developing a shopping list application in which users can scan multiple barcodes and see some data associated with the products. I succesfully integrated Scandit with MatrixScan and with BarcodeTrackingBasicOverlay it focuses correctly on the barcodes. I want then to migrate to BarcodeTrackingAdvancedOverlay and show a simple view with some text over the barcode but it doesen't work. I have a license to use Matrixscan. My initialization code is this

bool _loading = false;
Camera _camera = Camera.defaultCamera;
BarcodeTracking _barcodeTracking;
DataCaptureView _captureView;
TorchState _torchState =;
bool _isPermissionMessageVisible = false;
BarcodeTrackingAdvancedOverlay overlay;

  void initState() {



var captureSettings = BarcodeTrackingSettings();

_barcodeTracking = BarcodeTracking.forContext(_context, captureSettings)

_captureView = DataCaptureView.forContext(_context);

/*var _basicOverlay = BarcodeTrackingBasicOverlay.withBarcodeTrackingForView(
)..brush = Brush(Color(0x00FFFFFF), Color(0xFFFFFFFF), 2);*/

overlay = BarcodeTrackingAdvancedOverlay.withBarcodeTrackingForView(
)..listener = this;


_barcodeTracking.isEnabled = true;

The body of the view is a simple Stack with a Center in which I show the _captureview and some text. My fist implementation was with the BarcodeTrackingAdvancedOverlayListener and it didn't show any widget over barcodes:

 PointWithUnit offsetForTrackedBarcode(
  BarcodeTrackingAdvancedOverlay overlay, TrackedBarcode trackedBarcode) {
return PointWithUnit(DoubleWithUnit(0, MeasureUnit.fraction),
    DoubleWithUnit(-1, MeasureUnit.fraction));

 Anchor anchorForTrackedBarcode(
  BarcodeTrackingAdvancedOverlay overlay, TrackedBarcode trackedBarcode) {

 Widget widgetForTrackedBarcode(
  BarcodeTrackingAdvancedOverlay overlay, TrackedBarcode trackedBarcode) {
return ARWidget(data: ?? 'CIAO');

I also tried with the didUpdateSession implementation (similar to the Scandit sample app) but also didn't work:

void didUpdateSession(
  BarcodeTracking barcodeTracking, BarcodeTrackingSession session) {

  for (final lostTrackIdentifier in session.removedTrackedBarcodes) {
  // You now know the identifier of the tracked barcode that has been lost.
  // Usually here you would remove the views associated.

for (final trackedBarcode in session.addedTrackedBarcodes) {
  // Fixed identifier for the tracked barcode.
  var trackingIdentifier = trackedBarcode.identifier;

  // Current location of the tracked barcode.
  var location = trackedBarcode.location;
      .then((quadrilateral) => {
    _updateView(trackedBarcode, location)

_updateView(TrackedBarcode trackedBarcode, Quadrilateral viewLocation) {
// If the barcode is wider than the desired percent of the data capture view's width, show it to the user.
var shouldBeShown = viewLocation.width() > MediaQuery.of(context).size.width * 0.1;
if (!shouldBeShown) {
  overlay.setWidgetForTrackedBarcode(null, trackedBarcode);

var bubble = ARWidget(data: ?? '');
overlay.setWidgetForTrackedBarcode(bubble, trackedBarcode);

@override void didTapViewForTrackedBarcode( BarcodeTrackingAdvancedOverlay overlay, TrackedBarcode trackedBarcode) {}

My ARWidget is this:

class ARWidget extends StatelessWidget {
final String data;

const ARWidget({Key key,}) : super(key: key);

Widget build(BuildContext context) {
return Container(
  width: 180,
  height: 60,
  decoration: BoxDecoration(
    color: const Color(0xFFFFFFEE),
    borderRadius: BorderRadius.circular(30),
  child: Row(
    textDirection: TextDirection.ltr,
    children: [
        width: 60,
        height: 60,
        decoration: BoxDecoration(
          color: const Color(0xFF58B5C2),
          borderRadius: BorderRadius.circular(30),
        child: Icon(
          color: Colors.white,


I saw on console that every time it tries to render the widget this error occur:

[        ] I/flutter ( 1208): 'package:flutter/src/widgets/focus_manager.dart': Failed assertion: line 1463 pos 12: 'RawKeyboard.instance.keyEventHandler == null': is not true.

Which with a bit of debugging found that it refers to LINE 34 of widget_to_base64_converter.dart.

final buildOwner = BuildOwner();

I also tried the sample AR Flutter app and had the same result. Do you have any idea on how to solve this issue or is it Scandit's fault?

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum