Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It seem doesn't work #27

Closed
disburden opened this issue Feb 18, 2020 · 7 comments
Closed

It seem doesn't work #27

disburden opened this issue Feb 18, 2020 · 7 comments

Comments

@disburden
Copy link

disburden commented Feb 18, 2020

Here is my code:

	void _submmit() async {
		if (await Vibration.hasVibrator()) {
			print("111");
			Vibration.vibrate(duration: 500);
			if (await Vibration.hasAmplitudeControl()) {
				Vibration.vibrate(amplitude: 128);
			}
		} else {
			print("222");
		}
	}

The log printed "111",but the phone didn't vibrate.
My phone is :iPhone 7
IOS: 13.3.1

@benjamindean
Copy link
Owner

Does running Vibration.vibrate() without arguments has the same results?

@ngothanhtai
Copy link

I have the same problem. And I run without arguments @benjamindean.

@benjamindean
Copy link
Owner

@ngothanhtai What is the device?

@ngothanhtai
Copy link

@benjamindean the Vibrate.vibrate() does not work on my iPhone XR but it works when using Vibrate.feedback(FeedbackType.impact);

@ngothanhtai
Copy link

@benjamindean I am sorry, I am using other package flutter_vibrate that have Vibrate.feedback(FeedbackType.impact);.

@itsakhiltiwari
Copy link

Please consider that default vibration duration is only 500ms. It might actually be working but you aren't noticing it because it vibrates only for 500ms. Try increasing that duration.

@disburden
Copy link
Author

It seems to be work, I don't know if it was the reason why I upgraded the iOS version, anyway, it's normal a few days ago.
I'll close it first

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants