Open AlexanderThiele opened 1 month ago
I have another question regarding the connection. i can enable the Connection via the enable method but how do i establish a connection to the pencil?
When i read the docs, i can monitor the connection state but there is no event happening after i enabled the sdk. I want to build my own UI with flutter and only want to exchange data to the native iPad OS.
My question now is, how to i connect to the pencil?
Hi @AlexanderThiele, Sorry, we don't have any experience with Flutter.
You can build your UI to tell users to Hold the stylus's tip and press then call this function. "startDiscoveryAndImmediatelyConnect", and you will receive a notification if the stylus is connected.
@adonitDevel thanks, found it as well. Maybe you could update the docs.
Regarding Flutter, if you want to support flutter, you have to attach the pencil touch events to the flutter engine instead of capturing them before they hit the flutter engine. The Apple Pencil works well with flutter. Maybe you should keep an eye on their flutter integration.
u can use provider it is a state management library in Flutter
Hey @rudramistry001 that makes no sense. in Flutter you want to have the gesture coordinates on the widget in it's local coordinates relative to their parents.
ok got it
Actually, @AlexanderThiele did write and open-source a plugin for Flutter – @AlexanderThiele don't be shy to share it here: https://pub.dev/packages/lamy_pencil_flutter Thanks a lot again!
Hey!
Do you have any experience or examples to use the Events inside a Flutter App? Especially to use the Events within a Listener-Widget in Flutter.
Thanks!