chulwoo-park/timelines

How to change contentsAlign for individual items.

ashamnx opened this issue · 1 comments

Was unable to find any clue in the documentation on how to use different contentsAlign for different items.

Im trying to use reverse align for some items in the timeline.

Example: For a timeline of football/soccer match, events come from both teams. Is it possible to use 'reverse' for the "away" team events only?

Please let me know if it is possible. Thank you

TimelineTile has two contents(contents and oppositeContents) and so does the TimelineTileBuilder.

just use if-else condition(or ternary operator).

like this:

...
contents: event.isHome ? Text(event.name) : SizedBox.shrink()
oppositeContents: event.isHome ? SizedBox.shrink() : Text(event.name)
...