timeline_tree 0.0.1 timeline_tree: ^0.0.1 copied to clipboard
A timeline tree that displays events or activities.
Timeline tree is used to display events or activities that occur over time in a hierarchical or nested manner.
Features #
• Progress indicator • highly customisable nodes • Customisable styling options
Getting started #
To install the package, run this command:
$ flutter pub add timeline_tree
This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get):
dependencies:
timeline_tree: ^0.0.1
Import it and use it in your dart code:
import 'package:timeline_tree/timeline_tree.dart';
Usage #
NODE ARRANGEMENT
• Position Node Left
TimelinePluginModel(
position: TimelinePluginViewPosition.left,
child: Container(
child: Text("Stage 2"),
),
• Position Node Right
TimelinePluginModel(
position: TimelinePluginViewPosition.right,
child: Container(
child: Text("Stage 2"),
),
PROGRESS INDICATOR
• Progress Indicator tint
TimelinePluginModel(
position: TimelinePluginViewPosition.right,
child: Container(
child: Text("Stage 2"),
isActive: true
),
const like = 'sample';
Additional information #
@position, is an enum that tells if to position the node to left and right @isActive, tells if the that object is active or not. This helps for people who want the timeline have states @child, the view to attached to the tree
class TimelinePluginModel {
final TimelinePluginViewPosition position;
final Widget child;
final bool isActive;
TimelinePluginModel({
required this.position,
required this.child,
required this.isActive,
});
}