Compare commits

...

2 commits

Author SHA1 Message Date
Vadim
b4be0cced3 migrated to http server iap 2024-02-12 16:09:47 +01:00
Vadim
d631f41589 [iOS] fixed vibration 2024-02-12 15:41:19 +01:00
2 changed files with 14 additions and 5 deletions

View file

@ -1,3 +1,5 @@
import 'dart:io';
import 'package:vibration/vibration.dart';
class HapticsService {
@ -11,10 +13,17 @@ class HapticsService {
Future<void> _tryVibrate({required int duration, required int amplitude}) async {
if (await _canVibrate()) {
await Vibration.vibrate(
duration: duration,
amplitude: amplitude,
);
if (Platform.isAndroid) {
await Vibration.vibrate(
duration: duration,
amplitude: amplitude,
);
} else {
await Vibration.vibrate(
pattern: [duration],
intensities: [amplitude],
);
}
}
}

View file

@ -28,7 +28,7 @@ dependencies:
m3_lightmeter_iap:
git:
url: "https://github.com/vodemn/m3_lightmeter_iap"
ref: v0.7.2
ref: v0.8.0
m3_lightmeter_resources:
git:
url: "https://github.com/vodemn/m3_lightmeter_resources"