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
27 changes: 27 additions & 0 deletions example/lib/pub_dev_example_basic.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// Basic example of how to get started

import 'package:timeline_tile/timeline_tile.dart';
import 'package:flutter/material.dart';

void main() {
runApp(MaterialApp(home: TimeLineTileExample()));
}

class TimeLineTileExample extends StatelessWidget {
@override
Widget build(BuildContext context) {
return ListView.builder(
itemCount: 4,
itemBuilder: (context, index) {
return TimelineTile(
// Indicates this is the first item of the listview is the first item
// of the timeline. Removes line before this item.
isFirst: index == 0,
// Indicates this is the 4th item of the listview is the last item
// of the timeline. Removes line after this item.
isLast: index == 3,
);
},
);
}
}