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

How to padding indicator dot with const value? #34

Open
alien142 opened this issue May 11, 2021 · 5 comments
Open

How to padding indicator dot with const value? #34

alien142 opened this issue May 11, 2021 · 5 comments

Comments

@alien142
Copy link

Use indicatorXY, I can change dot indicator location. But each item in the listview will have a different content size, so if I dont set indicatorXY: 0.5, dot indicator position problem will occur.
If I set indicatorXY: 0.0 and set padding top, the beforeLineStyle will be disappear.
I am looking for a solution can help me modify only dot indicator with const padding.

@JHBitencourt
Copy link
Owner

Hey @alien142, thanks for the issue.

Can you provide an example or images on what you're trying to achieve?

@alien142
Copy link
Author

@JHBitencourt Sure, I want indicator dot straight to the title. It's not correctly for all item if set indicatorXY value because each item will have different content size

Screen Shot 2021-05-12 at 15 07 06

@Rakshak1344
Copy link

Rakshak1344 commented Aug 8, 2021

If each end child has a random height then the indicator doesn't align with the indicator.
Also, I face spacing issues for each tile
I face the same problem. @JHBitencourt

@rizbud
Copy link

rizbud commented Apr 26, 2022

facing same problem

@rizbud
Copy link

rizbud commented Apr 26, 2022

You can set the indicator style height as static, then add margin to the custom indicator

TimelineTile

indicatorStyle: IndicatorStyle(
    width: 16,
    height: 24,
    indicatorXY: 0,
    indicator: _indicator(),
),

Custom Indicator

return Container(
    margin: const EdgeInsets.only(top: Spacing.small),
    // Rest of your code
);

Screenshot 2022-04-26 at 12 06 25

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

No branches or pull requests

4 participants