Question : How to align the nodes to the left ?
Closed this issue ยท 5 comments
Hi,
I would like to align the nodes to the left in order to have a fixed size for the content and the remaining space for the opposite content. There is a property nodeAlign
in TimelineTile
that used to compute the effective node position :
double _getEffectiveNodePosition(BuildContext context) {
if (nodeAlign == TimelineNodeAlign.start) return 0.0;
if (nodeAlign == TimelineNodeAlign.end) return 1.0;
var nodePosition = this.nodePosition;
nodePosition ??= (node is TimelineTileNode)
? (node as TimelineTileNode).getEffectivePosition(context)
: TimelineTheme.of(context).nodePosition;
return nodePosition;
}
This property can't be used in TimelineTileBuilder
so please what is the simplest way to define the nodeAlign
?
Try using nodePosition
in TimelineTheme?
Check how it works here (Theme)
Great package !
Timeline.tileBuilder(theme: TimelineThemeData(connectorTheme: ConnectorThemeData(space: 51)))
Try using
nodePosition
in TimelineTheme?Check how it works here (Theme)
nodePosition works but it's the a percentage between 0 and 1.
If the screen is too small then the oppositeContent width will shrink it's content.
What I'm looking for is a fixed width for oppositeContent and the remaining width for the content.
Timeline.tileBuilder(theme: TimelineThemeData(connectorTheme: ConnectorThemeData(space: 51)))
Connector's space is the space between the content and the oppositeContent, it's not the width of the oppositeContent.
I got it.
There is no option yet to provide the feature you are talking about.๐ข
Since it uses Flexible internally, I think it is necessary to explicitly limit the size of the opossite content.
ok thank you ๐