getRegionOfInterest property

Future<List<double>> getRegionOfInterest

Retrieves the region of interest (ROI).

Returns a Future that completes with a list of doubles representing the region of interest left, top, width, height.

Example usage:

List<double> roi = await _barkoder.getRegionOfInterest;
print('Region of interest: $roi');

Implementation

Future<List<double>> get getRegionOfInterest async {
  if (_isBarkoderViewNotMounted) {
    return Future.error(PlatformException(
        code: BarkoderErrors.barkoderViewNotMounted,
        message: BarkoderErrors.barkodeViewNotMountedDesc));
  }

  return await _methodChannel
      .invokeMethod('getRegionOfInterest')
      .then((value) {
    return List.from(value);
  });
}