Closed umersaddiq closed 1 year ago
Can you, please, provide an example? And remember that the plugin only supports async calls.
I had the same issue on my web project using flutter null safety.
This is the code used for solution:
try { bool? hasVibration = await Vibration.hasVibrator(); if (hasVibration != null && hasVibration) { bool? hasCustomVibration = await Vibration.hasCustomVibrationsSupport(); if (hasCustomVibration != null && hasCustomVibration) { await Vibration.vibrate(duration: c.duration!); } else { await Vibration.vibrate(); } } }...
Should be solved in the latest version.
On Vibration.vibrate() it throws a message null check operator called on null value
Flutter Version 2.8.1 Dart Version 2.15.1