huhuang03 / reorderable_grid_view

MIT License
46 stars 33 forks source link

The offset is not right when draging grid_view #49

Closed mnba3223 closed 1 year ago

mnba3223 commented 1 year ago

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.

huhuang03 commented 1 year ago

Hello, maybe you can try

ReorderableSliverGridView.count

instead of

ReorderableGridView
mnba3223 commented 1 year ago

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.

huhuang03 commented 1 year ago

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

mnba3223 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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