Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minimum Height #15

Open
Faiyyaz opened this issue Aug 26, 2020 · 7 comments
Open

Minimum Height #15

Faiyyaz opened this issue Aug 26, 2020 · 7 comments
Assignees

Comments

@Faiyyaz
Copy link

Faiyyaz commented Aug 26, 2020

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?

@talski
Copy link

talski commented Sep 3, 2020

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

@JHBitencourt
Copy link
Owner

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

@Faiyyaz
Copy link
Author

Faiyyaz commented Sep 16, 2020

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

@JHBitencourt
Copy link
Owner

I'm afraid that I will only be able to help with some code that I can execute and see what is going on.

@Faiyyaz
Copy link
Author

Faiyyaz commented Oct 3, 2020

Sorry for the late reply @JHBitencourt I will provide you an example code shortly

@Faiyyaz
Copy link
Author

Faiyyaz commented Oct 3, 2020

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.

Screenshot_2020-10-03-11-56-42-35_476d1d321e32b6ac1a964a8cb6b40c6f

@JHBitencourt
Copy link
Owner

JHBitencourt commented Oct 3, 2020

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:

image

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants