0

I have tried using flutter_vibrate and vibrate which work with Android devices.

However, I can't get these packages working with iOS.

I am using an iPhone 14 Pro Max as simulator, and checking if the device can vibrate which returns false.

I thought maybe this is related to the simulator but when I tried on a real iPhone (XR) it returns true that the iPhone device can vibrate but it doesn't actually vibrate.

I can't see anymore package information for setup needed with iOS, so not sure what the issue could be and how to fix it?

  Future<bool> _vibrate() async {
    if (await Vibrate.canVibrate == true) {
      print('vibrate');
      await  Vibrate.vibrate();
      return true;
    } else {
      print('cannot vibrate');
      return false;
    }
  } 

Kdon
  • 892
  • 6
  • 19
  • 1
    have you trying use `HapticFeedback.lightImpact()` or `HapticFeedback.heavyImpact()` from flutter services? You dont need extra library with that. Check this out https://stackoverflow.com/questions/56402196/flutter-how-to-use-hapticfeedback – Septian Dika May 29 '23 at 01:54

0 Answers0