Skip to content

Cannot draw when PencilKit is inside an InteractiveViewer or GestureDectector #13

@jack-szeto

Description

@jack-szeto

Description

When you put the PencilKit inside a InteractiveViewer, it can only draw a short line.
It's likely it triggered the pan threshold. I tried to set panEnabled to false, still experience the same.

Edit

After some testing, you cannot draw when you wrapped the PencilKit with GestureDetector also.

Steps to reproduce

  1. Create a new Flutter app
  2. Add a InteractiveViewer
  3. Set the panEnabled to false
  4. Add a PencilKit to the child of InteractiveViewer
  5. Run the app

Snack or a link to a repository

https://github.com/jack-szeto/pencilkit_minimal.git

package version

1.0.6

Flutter Doctor Output

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.16.7, on macOS 13.6 22G120 darwin-arm64, locale zh-Hant-HK)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.2)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.1)
[✓] VS Code (version 1.85.1)
[✓] Connected device (3 available)
[✓] Network resources

• No issues found!

Build type

Debug mode

Device

iOS Real device

Device model

iPad (9)

Acknowledgements

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions