isVibrateOnSuccessEnabled property
Retrieves the value indicating whether vibration is enabled on successful barcode scanning.
Returns a Future that completes with a boolean indicating whether vibrate on success is enabled.
Example usage:
bool vibrateOnSuccessEnabled = await _barkoder.isVibrateOnSuccessEnabled;
print('Vibrate on success enabled: $vibrateOnSuccessEnabled');
Implementation
Future<bool> get isVibrateOnSuccessEnabled async {
if (_isBarkoderViewNotMounted) {
return Future.error(PlatformException(
code: BarkoderErrors.barkoderViewNotMounted,
message: BarkoderErrors.barkodeViewNotMountedDesc));
}
return await _methodChannel.invokeMethod('isVibrateOnSuccessEnabled');
}