data_table_2 icon indicating copy to clipboard operation
data_table_2 copied to clipboard

Horizontal Scrolling not working properly in iOS

Open ShanthiniMM opened this issue 3 years ago • 4 comments

@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.

ShanthiniMM avatar Sep 22 '22 06:09 ShanthiniMM

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.

maxim-saplin avatar Sep 22 '22 18:09 maxim-saplin

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.

ShanthiniMM avatar Sep 23 '22 04:09 ShanthiniMM

Try wrapping data table into ScrollConfiguration:

        ScrollConfiguration(
          behavior: const ScrollBehavior()
              .copyWith(physics: const ClampingScrollPhysics()),
          child: DataTable2(

maxim-saplin avatar Sep 25 '22 07:09 maxim-saplin

This solution is working for ios, Thanks :)

lutacch avatar Jan 30 '24 17:01 lutacch