flutter_shimmer: Not supported for web.

════════ Exception caught by scheduler library ═════════════════════════════════
UnimplementedError
═════════════════════════════════

I’m getting this error while running this package on flutter web.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 43
  • Comments: 33 (5 by maintainers)

Most upvoted comments

(Thanks for the package, I love it on mobile!) Re web support, in the meantime it might be better to remove the “web” tag from this package on pub.dev.

@hnvn Please remove “web” tag. The above issue brought me here. I hope we can use shimmer in Flutter web too. 😃 image

its been a while, we need official support for web.

https://github.com/flutter/flutter/pull/76536 got merged and can confirm that on master channel the package is working on web now! (both HTML and Skia)

Flutter 1.27.0-5.0.pre.99 • channel master •
https://github.com/flutter/flutter.git
Framework • revision 9b6d267ea3 (85 minutes ago) • 2021-02-22 21:21:03 +0300
Engine • revision 07afcf7d0f
Tools • Dart 2.13.0 (build 2.13.0-52.0.dev)

shimmer

big thanks for @ferhatb

Important that WEB badge not be included. Does not work for web

════════ Exception caught by scheduler library ═════════════════════════════════ UnimplementedError ════════════════════════════════════════════════════════════════════════════════

@hnvn Please remove “web” tag. The above issue brought me here. I hope we can use shimmer in Flutter web too. 😃 image

The WEB badge is not added by the authors it is added by the pub.dev analyzer seeing that this is a package (not a plugin) and then adding it

I confirm that shimmer works on Web with Flutter v2.2.2. Anybody can confirm it as well?

I can confirm too that its working with Flutter v2.2.2

That’s a shame, seems like support was added 11 days before Flutter 2.0 was released (https://github.com/flutter/flutter/pull/76536). I doubt it’s eligible for a hotfix considering that it’s still partially broken https://github.com/flutter/flutter/issues/77051 and it’s not a regression or critical fix https://github.com/flutter/flutter/wiki/Flutter-Cherrypick-Process

try to run with flutter run -d chrome --web-renderer=html

It depends heavily on rendering API (i.e. canvas and blend mode). I have tried to work on this issue but have not found a solution yet. It seems we may as well wait for Flutter engine supporting these APIs on Web

Does this work with the canvaskit renderer on the stable channel? I’m getting the following error:

======== Exception caught by scheduler library =====================================================
The following UnimplementedError was thrown during a scheduler callback:
UnimplementedError

When the exception was thrown, this was the stack: 
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 236:49  throw_
lib/_engine/engine/canvaskit/layer_scene_builder.dart 196:5                   pushShaderMask
packages/flutter/src/rendering/layer.dart 1779:26                             addToScene
packages/flutter/src/rendering/layer.dart 407:5                               [_addToSceneWithRetainedRendering]
packages/flutter/src/rendering/layer.dart 994:14                              addChildrenToScene

ShaderMask was not implemented inside the Flutter framework on the web platform, so that’s why it throws an error. It was recently added but it didn’t land to a stable channel yet. When I tried beta channel last time it still had some issues (but didn’t throw an error). So you need to switch to dev/master channel if you want to use this on the web…

Seems like that it will be soon possible! https://github.com/flutter/engine/pull/24029

I assume that the canvas operations that are unsupported on web with DomCanvas (HTML rendering) do work with CanvasKit. If you want to give that a try, you can run your Flutter web app using the following command:

flutter run -d chrome --dart-define=FLUTTER_WEB_USE_SKIA=true

More information on that can be found here. Note that I did not look into this further - I was made aware of this issue and thought that I might be able to offer help. In case anyone tries this out, let me know if it worked 😃

Unfortunately even with that flag it doesn’t work. Another exception was thrown: UnimplementedError

Hopefully flutter/engine#21756 makes it possible

I haven’t ever touched Flutter web version. Welcome anyone who has experiences with it to contribute and bring this package on the web version.