flutter timeline widget
displays a scrollable timeline with custom child widgets and custom icons.
installation
in your pubspec.yaml
file within your flutter project:
dependencies:
timeline_list: ^0.0.3
features
- 3 different timeline alignments.
left, center, right
. - on demand child building with
timeline.builder
. - custom icon and icon size support (icon sizes supported only on centered timeline).
usage
import 'package:timeline_list/timeline.dart';
import 'package:timeline_list/timeline_model.dart';
list<timelinemodel> items = [
timelinemodel(placeholder(),
position: timelineitemposition.random,
iconbackground: colors.redaccent,
icon: icon(icons.blur_circular)),
timelinemodel(placeholder(),
position: timelineitemposition.random,
iconbackground: colors.redaccent,
icon: icon(icons.blur_circular)),
];
return timeline(children: items, position: timelineposition.center);
example
a sample timeline app can be found in the example/
folder.
Comments are closed.