fluttercandies / flutter_drawing_board

A new Flutter package of drawing board
MIT License
194 stars 68 forks source link

[Bug report] can't draw in some cases, because of the false finger count #34

Closed HasanAlqaisi closed 8 months ago

HasanAlqaisi commented 1 year ago

Version

0.5.0

Platforms

Android, iOS

Device Model

Galaxy note 9 (android 13)

flutter info

[✓] Flutter (Channel stable, 3.13.2, on Linux Mint 21.2 5.15.0-87-generic,
    locale en_US.UTF-8)
    • Flutter version 3.13.2 on channel stable at
      /home/hasan/development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision ff5b5b5fa6 (10 weeks ago), 2023-08-24 08:12:28 -0500
    • Engine revision b20183e040
    • Dart version 3.1.0
    • DevTools version 2.25.0

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
    • Android SDK at /home/hasan/Android/Sdk
    • Platform android-33-ext4, build-tools 33.0.2
    • Java binary at: /home/hasan/development/android-studio/jbr/bin/java
    • Java version OpenJDK Runtime Environment (build
      11.0.15+0-b2043.56-8887301)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at google-chrome

[✓] Linux toolchain - develop for Linux desktop
    • Ubuntu clang version 14.0.0-1ubuntu1.1
    • cmake version 3.22.1
    • ninja version 1.10.1
    • pkg-config version 0.29.2

[✓] Android Studio (version 2022.1)
    • Android Studio at /home/hasan/development/android-studio
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build
      11.0.15+0-b2043.56-8887301)

[✓] VS Code (version 1.83.1)
    • VS Code at /usr/share/code
    • Flutter extension version 3.74.0

[✓] Connected device (3 available)
    • SM N960F (mobile) • 2b32ca38291c7ece • android-arm64  • Android 13 (API
      33)
    • Linux (desktop)   • linux            • linux-x64      • Linux Mint 21.2
      5.15.0-87-generic
    • Chrome (web)      • chrome           • web-javascript • Google Chrome
      118.0.5993.117

[✓] Network resources
    • All expected network resources are available.

• No issues found!

How to reproduce?

I recorded this video from the example of this repo.

https://github.com/fluttercandies/flutter_drawing_board/assets/57685540/580f387c-8fb0-4571-a5d2-672e8cbd759b

After some debugging, the issue is with the finger count. Somehow it will stuck with a value that makes the board in the zoom mode only (because it indicates more than one finger, but it is actually only one finger). Some of my users have this issue as well when they try to zoom in, then the same issue happens. Adding onPointerCancel that reduces the finger count to the listener in the source code as suggested in this issue solves the issue. But I am using your great library in an important app so I am not sure if I should fork it to apply this solution or it could cause other issues.

Logs

No response

Example code (optional)

No response

Contact

No response