startCamera method

Future<void> startCamera()

Starts the camera.

Example usage:

await _barkoder.startCamera();
print('Camera started successfully');

Implementation

Future<void> startCamera() {
  if (_isBarkoderViewNotMounted) {
    return Future.error(PlatformException(
        code: BarkoderErrors.barkoderViewNotMounted,
        message: BarkoderErrors.barkodeViewNotMountedDesc));
  }

  return _methodChannel.invokeMethod('startCamera');
}