Skip to content

Commit

Permalink
chore: remove keypress vibrate from ios. vibrate length not customisa…
Browse files Browse the repository at this point in the history
…ble.
  • Loading branch information
Davud Welsh committed Jan 28, 2025
1 parent 6237f40 commit b62d22d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ PODS:
- shared_preferences_foundation (0.0.1):
- Flutter
- FlutterMacOS
- url_launcher_ios (0.0.1):
- Flutter
- vibration (1.7.5):
- Flutter

Expand All @@ -127,6 +129,7 @@ DEPENDENCIES:
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
- share_plus (from `.symlinks/plugins/share_plus/ios`)
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
- vibration (from `.symlinks/plugins/vibration/ios`)

SPEC REPOS:
Expand Down Expand Up @@ -169,6 +172,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/share_plus/ios"
shared_preferences_foundation:
:path: ".symlinks/plugins/shared_preferences_foundation/darwin"
url_launcher_ios:
:path: ".symlinks/plugins/url_launcher_ios/ios"
vibration:
:path: ".symlinks/plugins/vibration/ios"

Expand All @@ -191,12 +196,13 @@ SPEC CHECKSUMS:
MLKitVision: e858c5f125ecc288e4a31127928301eaba9ae0c1
mobile_scanner: 8564358885a9253c43f822435b70f9345c87224f
nanopb: 438bc412db1928dac798aa6fd75726007be04262
package_info_plus: 58f0028419748fad15bf008b270aaa8e54380b1c
package_info_plus: c0502532a26c7662a62a356cebe2692ec5fe4ec4
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
share_plus: 8875f4f2500512ea181eef553c3e27dba5135aad
shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78
url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe
vibration: 7d883d141656a1c1a6d8d238616b2042a51a1241

PODFILE CHECKSUM: 05ad0b2f2f455a7af8753a696c25327bc0d22dc9
Expand Down
4 changes: 4 additions & 0 deletions lib/common_widgets/pin_pad.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'dart:io';
import 'dart:math';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
Expand Down Expand Up @@ -447,6 +448,9 @@ class PinPadState extends ConsumerState<PinPad> with TickerProviderStateMixin {
}

Future<void> _handleVibration(int duration) async {
if (Platform.isIOS) {
return;
}
if (await Vibration.hasVibrator() ?? false) {
Vibration.vibrate(duration: duration);
}
Expand Down
3 changes: 3 additions & 0 deletions lib/features/dashboard/dashboard_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,9 @@ class DashboardScreenState extends ConsumerState<DashboardScreen> {
}

Future<void> _handleVibration(int duration) async {
if (Platform.isIOS) {
return;
}
if (await Vibration.hasVibrator() ?? false) {
Vibration.vibrate(duration: duration);
}
Expand Down

0 comments on commit b62d22d

Please sign in to comment.