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

The offset is not right when draging grid_view #49

Closed
mnba3223 opened this issue Oct 28, 2022 · 7 comments
Closed

The offset is not right when draging grid_view #49

mnba3223 opened this issue Oct 28, 2022 · 7 comments

Comments

@mnba3223
Copy link

mnba3223 commented Oct 28, 2022

HI. I use your amazing package normally, until I add nested router in this.

And this is position incorrect when I draging the gridveiw item in our app.

1666924453595

But when I take off the nested router, it's work fine.

@mnba3223 mnba3223 changed the title The offset is not right when drag grid_view The offset is not right when draging grid_view Oct 28, 2022
@huhuang03
Copy link
Owner

Hello, maybe you can try

ReorderableSliverGridView.count

instead of

ReorderableGridView

@mnba3223
Copy link
Author

Hello, maybe you can try

ReorderableSliverGridView.count

instead of

ReorderableGridView

Sorry I didn't tell you my version first.
flutter: 3.4.0
reorderable_grid_view: ^2.2.5

And if I change to ReorderableGridView, how can I use the ReorderableSliverGridView's header and footer, I think those two function is great.

@mnba3223 mnba3223 closed this as not planned Won't fix, can't repro, duplicate, stale Oct 28, 2022
@mnba3223 mnba3223 reopened this Oct 28, 2022
@huhuang03
Copy link
Owner

huhuang03 commented Oct 29, 2022

Maybe you can try ReorderableSliverGridView in version 2.2.6-alpha.1. Has footer and header function.

@mnba3223
Copy link
Author

mnba3223 commented Oct 31, 2022

Thanks for reply, I try to use ReorderableSliverGridView.count, But still has same problem.
When I add nested router, it will cause same height offset when drag the button.

您好,感謝回覆,我後來使用 ReorderableSliverGridView.count 還是會在抓取時有y軸的偏移,原因是在當加入嵌套路由的用法後,會有一樣高度的偏移。

版本有更新到2.2.6-alpha.1
nested router like this

  Widget designController(String library) {
    return Navigator(
      initialRoute: '/',
      onGenerateRoute: (RouteSettings settings) {
        late WidgetBuilder builder;
        switch (settings.name) {
          case '/':
            builder = (context) => DesignLibraryPage(context, library);
            break;
        }
        return MaterialPageRoute(builder: builder);
      },
    );
  }

@mnba3223
Copy link
Author

mnba3223 commented Oct 31, 2022

Hey, @huhuang03 , I modify your example(sorry not modify good), But bug is occur

sorry file is too big,
https://drive.google.com/file/d/1ef-sf6gFnPDbzvb4_MuCkLozKSDc_PQr/view?usp=sharing

if you open this example, tab to the fourth tab(sliver), and grab the grid, you will see the bug.

@huhuang03
Copy link
Owner

huhuang03 commented Nov 1, 2022

Hello. Please try version 2.2.6-alpha.2. Should resolved.

ReorderableSliverGridView or ReorderableGridView is not the real reason. You can use any of them.

@mnba3223
Copy link
Author

mnba3223 commented Nov 1, 2022

Thanks a lot, it's worked!!!!!

@mnba3223 mnba3223 closed this as completed Nov 3, 2022
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