Resource Base
Table of contents

FeedBack

The FeedBack class allows you to control the haptic feedback features so that the phone can either beep or vibrate when a result is found.

Definition

Assembly: dynamsoft_capture_vision_flutter

class FeedBack

Methods

beep

Plays a beep sound when a captured result is found.

static Future<void> beep()

vibrate

Triggers a vibration when a captured result is found.

static Future<void> vibrate()

Code Snippet

late final CapturedResultReceiver _receiver = CapturedResultReceiver()
    ..onDecodedBarcodesReceived = (DecodedBarcodesResult result) async {
      if (result.items?.isNotEmpty ?? false) {
        FeedBack.beep();
        FeedBack.vibrate();
        _cvr.stopCapturing();
        var displayString = result.items?.map((item) => "Format: ${item.formatString}\nText: ${item.text}").join('\n\n');
        showTextDialog("Barcodes Count: ${result.items?.length ?? 0}", displayString ?? "", () {
          _cvr.startCapturing(_templateName);
        });
      }
    };

This page is compatible for:

Is this page helpful?

YesYes NoNo

In this article: