maxim-saplin / data_table_2

In-place substitute for Flutter's DataTable and PaginatedDataTable with fixed/sticky header and extra features
https://pub.dev/packages/data_table_2
BSD 3-Clause "New" or "Revised" License
202 stars 137 forks source link

Horizontal Scrolling not working properly in iOS #141

Open ShanthiniMM opened 1 year ago

ShanthiniMM commented 1 year ago

@maxim-saplin I am using the datatable2 package in my flutter project. It is working fine in android. but In iOS when scrolling horizontally the headers and rows are splitting. How to solve this issue. Kindly Let me know.

Thanks in advance.

maxim-saplin commented 1 year ago

I believe the issue you see happens when reaching edges of the scrollable and when iOS bouncing animation happens. If that's the case it doesn't have a fix and no plan to work on it yet. It is a side effect of the fixed part implementation detail. One of the workaround is playing with scrolling physic and disabling the edge animations.

ShanthiniMM commented 1 year ago

Thank you. I need to add "physics: new ClampingScrollPhysics()" in the datatable2 package code. How can I do that? If any samples available, Kindly Let me know.

maxim-saplin commented 1 year ago

Try wrapping data table into ScrollConfiguration:

        ScrollConfiguration(
          behavior: const ScrollBehavior()
              .copyWith(physics: const ClampingScrollPhysics()),
          child: DataTable2(
lutacch commented 7 months ago

This solution is working for ios, Thanks :)