timeline_tile
timeline_tile copied to clipboard
Minimum Height
Hi,
Thanks for such a great library but i am facing one issue.
The issue is there is some minimum height given to the right child. I want the right child to be build of the exact size as per the content and not the minimum size so please can you help me with this issue?
I've wraped the Timeline Tile with a Container and set constraints to the desired maxHeight, worked here, if there's a proper way, please tell us
Hey there. Thanks for the issue.
Well, like @talski pointed out, you can play with the size using a BoxConstraints
on the children.
Involving them inside a Container
or a ConstrainedBox
widget, it is totally normal.
Let me know if this help, or provide some example code to illustrate the problem. 👍
Actually in my case it is a card with a column containing multiple text widgets. So I won' be able to know the height to set a constraint
I'm afraid that I will only be able to help with some code that I can execute and see what is going on.
Sorry for the late reply @JHBitencourt I will provide you an example code shortly
Here is the code repo link for the attached screenshot
https://github.com/Faiyyaz/timeline_tile_bug.git
The bug is in the card with blue background color. As you can see it gives me some extra padding in the card where the data is not much. And i can't ascertain constraints because this data will be dynamic.
Thanks for the example.
If you check here the football, weather and success timeline work with dynamic child height.
But I forked and updated your project (upgraded timeline_tile
version to 1.0.0
), final result:
The problem is, you are using TimelineAlign.manual
that requires both a startChild
(left) and rightChild
(right).
When you don't provide a child, it uses a defaultChild
with a fixed height of 100.
So, you can either use TimelineAlign.start
with a rightChild
, or simply stay with TimelineAlign.manual
and pass an empty Container()
to startChild
. I did this last one to your repo.
Let me know if this helped.