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

Shimmer on flutter web throwing UnimplementedError #52

Open
Simouche opened this issue Aug 2, 2021 · 0 comments
Open

Shimmer on flutter web throwing UnimplementedError #52

Simouche opened this issue Aug 2, 2021 · 0 comments

Comments

@Simouche
Copy link

Simouche commented Aug 2, 2021

Hello, I have this code:

  const ProductCard({Key? key}) : super(key: key);

  @override
  _ProductCardState createState() => _ProductCardState();
}

class _ProductCardState extends State<ProductCard> {
  @override
  Widget build(BuildContext context) {
    return Shimmer.fromColors(
      baseColor: Colors.grey[300]!,
      highlightColor: Colors.grey[100]!,
      enabled: true,
      child: Column(
        mainAxisSize: MainAxisSize.max,
        children: <Widget>[
          Stack(
            alignment: AlignmentDirectional.topEnd,
            children: <Widget>[
              Image.asset("assets/images/placeholders/1.png"),
              Container(
                margin: EdgeInsets.only(top: 10.0, right: 10.0),
                padding: EdgeInsets.symmetric(horizontal: 5.0, vertical: 1.0),
                color: BROWN,
                child: Text(
                  "NEW",
                  style: Theme.of(context).textTheme.headline5,
                ),
              )
            ],
          ),
          SizedBox(height: 5.0),
          Text(
            translate(Keys.Pages_Products_Category),
            style: Theme.of(context).textTheme.headline6,
          ),
          SizedBox(height: 5.0),
          Text(
            "Product Name",
            style:
                Theme.of(context).textTheme.headline5!.copyWith(color: BLACK),
          ),
          SizedBox(height: 5.0),
          Text(
            "5000.00 DZD",
            style: Theme.of(context).textTheme.caption,
          ),
        ],
      ),
    );
  }
}

When i try to run it on the web, it throws UnimplementedError:

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

When the exception was thrown, this was the stack: 
C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 236:49  throw_
C:/b/s/w/ir/cache/builder/src/out/host_debug/flutter_web_sdk/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

any idea about that? how to fix that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant