Dev-Owl / advanced_datatable

Advanced Datatable uses the Fultter PaginatedDataTable Widget and adds a few more functions to it
BSD 3-Clause "New" or "Revised" License
16 stars 16 forks source link

Is there any way to set the alignment of the pagination without build custom footer. #16

Closed anasasra closed 2 years ago

anasasra commented 2 years ago

Please provide as many information as possible to answer your question. Is there any way to centralizer or change alignment to left/right without building custom footer ?!

Dev-Owl commented 2 years ago

Not yet, feel free to adjust and create a push request: https://github.com/Dev-Owl/advanced_datatable/blob/98032512c5736fcae3e4b97e7d23a88ad54370fe/lib/datatable.dart#L742

The row would need an alignment property to center the elements. That could come from the widget with a default to not break the current flow.

anasasra commented 2 years ago

Ok I will do it tomorrow, what you think should be the default alignment ?

Dev-Owl commented 2 years ago

I would vote for the one that is set on the row by flutters default. In the end the change should not break current pages or require people to adjust the code to get the current behavior.

On Tue, 23 Nov 2021, 22:32 anasasra, @.***> wrote:

Ok I will do it tomorrow, what you think should be the default alignment ?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Dev-Owl/advanced_datatable/issues/16#issuecomment-977186741, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABCMO6ETP24LISKGBAZCNFTUNQB75ANCNFSM5ITZBPFQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

anasasra commented 2 years ago

Not yet, feel free to adjust and create a push request:

https://github.com/Dev-Owl/advanced_datatable/blob/98032512c5736fcae3e4b97e7d23a88ad54370fe/lib/datatable.dart#L742

The row would need an alignment property to center the elements. That could come from the widget with a default to not break the current flow.

is there any good reason for wrapping the Row widget with SingleChildScrollView ? because i can't see any major effect. The alignment of row will NOT work properly when wrap it with SingleChildScrollView, so I remove this widget to fix this issue. The default behavior changed so the footer align to start (left when English) instead of end, but actually this is the default alignment of the row, you just reverse when used SingleChildScrollView.

There another solution to wrap SizedBox with Align widget, but it's more confusing solution.

Dev-Owl commented 2 years ago

The main branch has an option to align the default footer, will be part of the next pub.dev update