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

Some effects fail on mobile web using the HTML renderer #78

Open
nietsmmar opened this issue Apr 26, 2023 · 7 comments
Open

Some effects fail on mobile web using the HTML renderer #78

nietsmmar opened this issue Apr 26, 2023 · 7 comments
Labels
bug Something isn't working flutter issue This issue is dependent on issues in Flutter or Dart

Comments

@nietsmmar
Copy link

nietsmmar commented Apr 26, 2023

This issue already came up here but was closed.

Some of the animations I use on my app will make my widgets disappear when I use the web-app on mobile devices. It works on desktop devices though. I tested to build for desktop, and build for web and tested in desktop browsers Firefox/Chrome/Chromium/Safari. It works fine there.

But when opening the webapp on mobile devices, either on android-devices or ios-devices, some of the animations will make widgets go disappear.

For example I use .animate().shimmer().shake() on one of my images. This makes it go disappear. Also I've build a Container that is using moveX(). There the same happens. Interestingly on some rare occasions it works.

I have no idea, what is going wrong. But this is a major issue, hence I created a new one, as the old one was just closed.

I've used flutter version 3.7.5 for building.

@gskinner
Copy link
Owner

This sounds like a Flutter framework issue. We're not using any platform specific code in Animate, so it should "just work". Would you mind filing an issue against Flutter and link back to this issue from it?

Thanks in advance!

@gskinner gskinner added the bug Something isn't working label Apr 26, 2023
@gskinner gskinner assigned gskinner and nietsmmar and unassigned gskinner Apr 26, 2023
@nietsmmar
Copy link
Author

I investigated further and it is only the shimmer effect that is making problems. The rest of the animations that I use work flawlessly. I don't know what to report to the Flutter framework. I have no idea how to describe the problem as it only happens with your package.

@gskinner
Copy link
Owner

gskinner commented May 2, 2023

Are you targeting html or canvaskit renderer? If you're using HTML, it may be due to this issue?
flutter/flutter#85140

@nietsmmar
Copy link
Author

nietsmmar commented May 3, 2023

I am using default Renderer. And it only happens on mobile devices.

So when I understand correctly:

By default, both html and canvaskit will be packaged in Web release, and then the canvaskit mode will be used on the PC side and the html mode will be used on the mobile side.

(https://medium.com/@GSYTech/how-to-optimize-flutter-web-and-how-flutter-web-work-in-html-renderer-b399ffd66718)

this will use html renderer on my mobile devices. So yes...probably it is this issue. Thanks!

@gskinner gskinner changed the title Animations are not reliably working on mobile devices when using web Shimmer animations do not work on mobile web May 17, 2023
@gskinner gskinner added the flutter issue This issue is dependent on issues in Flutter or Dart label May 17, 2023
@gskinner gskinner changed the title Shimmer animations do not work on mobile web Shimmer animations fail on mobile web using HTML renderer May 17, 2023
@gskinner gskinner changed the title Shimmer animations fail on mobile web using HTML renderer Some effects fail on mobile web using the HTML renderer Jun 5, 2023
@gskinner
Copy link
Owner

gskinner commented Jun 5, 2023

I just did an audit in iOS Simulator, and the following effects do not render correctly using Flutter's HTML renderer, though all do partially render, they just exhibit issues (don't animate, display incorrectly, etc):

  • BlurEffect
  • ColorEffect
  • SaturateEffect
  • ShimmerEffect
  • TintEffect

Also of note:

  • FollowPathEffect: rotates in ~10deg increments
  • ShaderEffect: doesn't work at all (expected)

I need to test on device, but thought I'd post the quick results here.

@gskinner
Copy link
Owner

gskinner commented Jun 5, 2023

Device testing on iOS, here's the effects that have trouble:

  • FollowPathEffect: Still rotates in fixed increments.
  • ShaderEffect: doesn't work (expected)
  • ShimmerEffect: Target flickers, and shimmer runs backwards.

Everything else seems to work fine on device.

@lukasnevosad
Copy link

For anyone bumping into this, I just encountered the same issue, but using CanvasKit and ColorEffect. Renders correctly on iOS and Android, fails both in Chrome and Safari on MacOS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working flutter issue This issue is dependent on issues in Flutter or Dart
Projects
None yet
Development

No branches or pull requests

3 participants