Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Exception on web, vibration package is broken #139

Closed
sgehrman opened this issue Jun 26, 2024 · 4 comments
Closed

[Bug]: Exception on web, vibration package is broken #139

sgehrman opened this issue Jun 26, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@sgehrman
Copy link

Package Version

4.0.8

Flutter Version

3.22

Platforms

Web

How to reproduce?

Screenshot-20240625205458-1878x1590

Logs (optional)

No response

Example code (optional)

set the debugger to break on all exceptions

Device Model (optional)

linux

@sgehrman sgehrman added the bug Something isn't working label Jun 26, 2024
@sgehrman
Copy link
Author

@sgehrman
Copy link
Author

I added a lame hack that seems to work

    if (!kIsWeb) {
      Vibration.hasVibrator().then(
          (value) => layerInteractionManager.deviceCanVibrate = value ?? false);
      Vibration.hasCustomVibrationsSupport().then((value) =>
          layerInteractionManager.deviceCanCustomVibrate = value ?? false);
    }

hm21 added a commit that referenced this issue Jun 26, 2024
…user settings

The `Vibration.hasVibrator` check will now only happen if the user has enabled hitVibration in the helperline configs. This resolves issue [#139](https://github.com/hm21/pro_image_editor/issue/139).
@hm21
Copy link
Owner

hm21 commented Jun 26, 2024

Okay, good that you open a new issue in the vibration package because the issue is from that package and not from my package.
However, I released version 4.1.1 which also doesn't check Vibration.hasVibrator() when you disable hitVibration inside the helperline configs like below.

configs: ProImageEditorConfigs(
      helperLines: const HelperLines(
        hitVibration: !kIsWeb,
      ),
)

@hm21 hm21 closed this as completed Jun 26, 2024
@sgehrman
Copy link
Author

ok, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants