apple_pencil_double_tap
2.0.0, released 4 weeks ago by codegrowers.tech
Flutter plugin for Apple Pencil double-tap and squeeze gestures on compatible iPads and iPhones.
What it does
Detects Apple Pencil double-tap and squeeze gestures via native UIKit interactions and exposes them through Dart callbacks. It supports hover pose information and user preferred action settings on compatible hardware.
AI-written summary of version 2.0.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You are building an iOS Flutter app that needs to respond to Apple Pencil double-tap gestures.
- You need to handle Apple Pencil Pro squeeze gestures and lifecycle phases.
- You want to retrieve the user's preferred Apple Pencil action settings from the iOS Settings app.
Skip it when
- You need to implement drawing, handwriting recognition, or raw stylus input tracking.
- You are targeting Android, web, or desktop platforms.
- You are using Apple Pencil 1st generation or Apple Pencil (USB-C) which do not support these gestures.
Strengths
- Supports both Apple Pencil double-tap and Apple Pencil Pro squeeze gestures.
- Provides hover pose coordinates and z-offset information.
- Supports Swift Package Manager alongside CocoaPods.
Weaknesses
- Limited to iOS and iPadOS platforms only.
- Hardware-dependent; older Apple Pencil models lack gesture support entirely.
Setup
- Kind
- Plugin (native code)
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
Requires iOS/iPadOS 15.0 or later and compatible Apple Pencil hardware. Swift Package Manager or CocoaPods is supported for iOS integration.
import 'package:apple_pencil_double_tap/apple_pencil_double_tap.dart';
final applePencil = ApplePencilDoubleTap();
applePencil.listen(
onTapAction: (TapAction action) {
print('TapAction: $action');
},
onSqueeze: (SqueezeAction action) {
print('Squeeze phase: ${action.squeezePhase}');
},
);
// applePencil.dispose();Alternatives
Packages that do the same job and could replace apple_pencil_double_tap.
- jni_flutter
Access Flutter Android APIs from Dart.
87Compare
Works with
Packages commonly used together with apple_pencil_double_tap: ones it builds on, ones built on it, and its own family.