pirooz_timeline 0.0.4 copy "pirooz_timeline: ^0.0.4" to clipboard
pirooz_timeline: ^0.0.4 copied to clipboard

Customizable Timeline

Pirooz Timeline is a customizable timeline. You can set your widget for indicator and the items,so you can create any timeline.

The name of library is Pirooz inspired of iranian cheetah cub.

Getting started #

To use Pirooz Timeline in your project, add the pirooz_timeline to your pubspec.yaml

Import the package to use it:

import 'package:pirooz_timeline/pirooz_timeline.dart';

Usage #

PiroozTimeline(flex: 5,
  indicatorAlignment: IndicatorAlignment.top,
  indicatorBuilder: (model, index) {},
  connectorStyle: const ConnectorStyle(
    color: Colors.amber,
    dashSpace: 4,
    dashHeight: 5,
  ),
  models: const [],
  widgetBuilder: (PiroozModel model, int index) {},
)

Syntax #

  • flex : proportion of item and it's indicator
  • indicatorAlignment : enum that contains three top,bottom and center alignment for indicator.
  • indicatorBuilder: a builder that gives you the model and index of the model, and you can create different indicators base on model runtimeType or index of it.
  • physics : scrolling physics. Default is NeverScrollableScrollPhysics
  • connectorStyle: Style of vertical dashes contains following properties:
    • color : color of dashes
    • dashSpace : space between dashes
    • dashHeight : height of each dash
    • width : width of each dash
    • showLineBeforeFirst : by default, showing dashes before first line has not good look for timeline. Dashes are seperated in two part, before indicator and after indicator. By setting this property true dash before indicator will be shown
    • showLineAfterLast : by default, showing dashes after last line has not good look for timeline. Dashes are seperated in two part, before indicator and after indicator. By setting this property true dash after indicator will be shown
    • padding : padding of connectors
  • models : list of item's that should be displayed in timeline. Each model should be subtype of PiroozModel. If previous or next indicator of models should be ignored, it can be handled by ignoreNext and ignorePrevious parameter.
  • widgetBuilder : a builder that gives you the model and index of the model, and you can create different items base on model runtimeType or index of it.
0
likes
120
pub points
0%
popularity

Publisher

unverified uploader

Customizable Timeline

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on pirooz_timeline