bool operator for hasVibrator
Closed this issue · 2 comments
nicolasvahidzein commented
i get an error when i try this:
if (Vibration.hasVibrator()) {
Vibration.vibrate(duration: 500);
return true;
}
saying
Conditions must have a static type of 'bool'.
Try changing the condition.
benjamindean commented
All the methods are Futures
. Meaning, you should await
them. You can always check it by checking the function return type. I released a new version with updated README.
nicolasvahidzein commented
Ok Benjamin, thanks. Will try that now.