Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions lib/src/tile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ class TimelineTile extends StatelessWidget {

@override
Widget build(BuildContext context) {

/// This used for detect current direction of layout
final bool isRTL = Directionality.of(context) == TextDirection.rtl;

return LayoutBuilder(
builder: (BuildContext context, BoxConstraints constraints) {
double startCrossAxisSpace = 0;
Expand All @@ -129,8 +133,8 @@ class TimelineTile extends StatelessWidget {
afterLineStyle: afterLineStyle ?? beforeLineStyle,
indicatorStyle: indicatorStyle,
hasIndicator: hasIndicator,
isLast: isLast,
isFirst: isFirst,
isLast: isRTL ? isFirst : isLast,
isFirst: isRTL ? isLast : isFirst,
),
if (endCrossAxisSpace > 0)
SizedBox(
Expand Down