mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-22 07:20:39 +00:00
Compare commits
No commits in common. "b4be0cced3046769b712ce5a1113527cf1b8e48b" and "f307676ca5671a430cd97b336ccf5a12cf91e9b6" have entirely different histories.
b4be0cced3
...
f307676ca5
2 changed files with 5 additions and 14 deletions
|
@ -1,5 +1,3 @@
|
|||
import 'dart:io';
|
||||
|
||||
import 'package:vibration/vibration.dart';
|
||||
|
||||
class HapticsService {
|
||||
|
@ -13,17 +11,10 @@ class HapticsService {
|
|||
|
||||
Future<void> _tryVibrate({required int duration, required int amplitude}) async {
|
||||
if (await _canVibrate()) {
|
||||
if (Platform.isAndroid) {
|
||||
await Vibration.vibrate(
|
||||
duration: duration,
|
||||
amplitude: amplitude,
|
||||
);
|
||||
} else {
|
||||
await Vibration.vibrate(
|
||||
pattern: [duration],
|
||||
intensities: [amplitude],
|
||||
);
|
||||
}
|
||||
await Vibration.vibrate(
|
||||
duration: duration,
|
||||
amplitude: amplitude,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ dependencies:
|
|||
m3_lightmeter_iap:
|
||||
git:
|
||||
url: "https://github.com/vodemn/m3_lightmeter_iap"
|
||||
ref: v0.8.0
|
||||
ref: v0.7.2
|
||||
m3_lightmeter_resources:
|
||||
git:
|
||||
url: "https://github.com/vodemn/m3_lightmeter_resources"
|
||||
|
|
Loading…
Reference in a new issue