flutter_horizontal_data_table icon indicating copy to clipboard operation
flutter_horizontal_data_table copied to clipboard

[Question] Any way to change the background color?

Open SwiftCODA opened this issue 3 years ago • 3 comments

Describe the Problem Can't change the background color of the vertical scrolling.

Using the default bouncing physics, a white background appears when you scroll too far up or down. Is there any way to change this to a different color? I have a dark UI and the white looks awful when you scroll past, yet I would like to keep the bouncing physics.

SwiftCODA avatar Jun 09 '22 05:06 SwiftCODA

Have you try to set the leftHandSideColBackgroundColor and rightHandSideColBackgroundColor? Default they are white in color.

MayLau-CbL avatar Jun 09 '22 07:06 MayLau-CbL

Hey, I misunderstood the meaning of that attribute. That is what I wanted. Although there is something I think the background color system is missing.

In my case, I have set up alternating row colors. When using bouncing physics horizontally, I would like to be able to have the background still show the alternating colors rather than just a solid color. Do you know what I mean?

SwiftCODA avatar Jun 11 '22 21:06 SwiftCODA

i see, your case is a bit complicated since you need to either (1) calculate the list children position and height or (2) use LinkedConrtoller registering every row with 1 controller to control the horizontal movement instead of the existing way in this package.

If you every row is sharing the same height, it might be possible to fork this package and apply the calulated background color to replace the Container's color.

If it is not all the same, I suggest you use the (2) approches. You may fork or create a new widget since the implementation on the scroll approch will be having big difference. Since you have to register a scroll controller to every row, I doubt the performance of the resultant widget be. Currently, this package's body is using one scrollcontroller for its horizontal scrolling to avoid many scroll controller being created and disposed while user swipe up and down to prevent lag on lower spec phone as possible.

Hope these information can help you.😃

MayLau-CbL avatar Jun 12 '22 06:06 MayLau-CbL

no further comment, close this first

MayLau-CbL avatar Dec 27 '22 04:12 MayLau-CbL