0Nom4D / GuardianDock

GuardianDock is a mobile app developed with Flutter for IOS and Android that allows Destiny users to check their stats and news about the game.
0 stars 0 forks source link

Article Layout with Tables #38

Closed 0Nom4D closed 8 months ago

0Nom4D commented 8 months ago

I implemented the layout for articles using the Flutter widget from HTML package.

Layout issue

When using this package, I found an issue in my layout when I tested layout with a table.

This issue results in a pixel overflow when the table is built. This also cancels the ability for the user to scroll.

Potential fixes

0Nom4D commented 8 months ago

This issue is cause by this line: https://github.com/0Nom4D/GuardianDock/blob/cb887bd0dbfe19d9109fb8abbbac8197ef889d66/lib/src/views/article_view.dart#L25-L42

This line makes the sliver part dedicated to the article body, to not have the right size.

Thus, I fixed this issue by replacing the SliverFillRemaining widget by a simple SliverToBoxAdapter widget. This suppress the overflow. I don't know how, and I don't know why but the SliverFillRemaining widget seems to reduce the expanded size.

0Nom4D commented 8 months ago

When making some new tests, I found out that the tables are already handled to have horizontal scroll if the width of the table is higher than the device width. Thus, this issue is totally fixed and a fix will be made in the next PR.