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

Using sidekick inside a TableView.builder #4

Open
manueljpeixoto opened this issue Mar 15, 2019 · 1 comment
Open

Using sidekick inside a TableView.builder #4

manueljpeixoto opened this issue Mar 15, 2019 · 1 comment

Comments

@manueljpeixoto
Copy link

When I try to use sidekick inside a TableView.buider I get this error,
type 'RenderSliverList' is not a subtype of type 'RenderBox'
this happens for any limition of flutter or is by design?

@override
  Widget build(BuildContext context) {
    return Column(children: <Widget>[
      Expanded(
          flex: 2,
          child: Stack(children: <Widget>[
            GestureDetector(
              onTap: () => controller.moveToTarget(context),
              child: Sidekick(
                tag: 'target',
                child: Container(
                  color: Colors.blue,
                ),
              ),
            ),
          ])),
      Expanded(
          flex: 1,
          child: Container(
            child: ListView.builder(
                itemCount: 1,
                itemBuilder: (context, index) {
                  return GestureDetector(
                        onTap: () => controller.moveToTarget(context),
                        child: Sidekick(
                          tag: 'source',
                          targetTag: 'tagTarget',
                          child: Container(
                            height: 50,
                            width: 400,
                            color: Colors.red,
                        ),
                      ));
                }),
          ))
    ]);
  }
@emvaized
Copy link

@manueljpeixoto
This error appears when you pass Sliver widget to some widget, which accepts only non-sliver children.

Maybe you're trying to pass your TableView.builder as a child to CustomScrollView?

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

2 participants