Worm Indicator

A Flutter PageView indicator insprired by worm animation. It can be easily integrated with any Flutter PageView. Pull requests are welcome

Features

  • Use with PageView to display scroll progress

Getting Started

Make sure you add the lib dependency in your flutter project.

dependencies:
  worm_indicator: 0.2.1

Then you should run flutter packages get to update your packages in your IDE.

Example Project

Checkout the project inside example folder.

Usage

Circle and Square DotShape need size. Rectangle DotShape need width and height.

WormIndicator(
  length: 3,
  controller: _controller,
  shape: Shape(
    size: 16,
    spacing: 8,
    shape: DotShape.Circle  // Similar for Square
  ),
),
WormIndicator(
  length: 3,
  controller: _controller,
  shape: Shape(
    width: 16,
    height: 24,
    spacing: 8,
    shape: DotShape.Rectangle
  ),
),

Properties:

NameUsageType
lengthNumber of dotsint
controllerPageView controllerPageController
shapeShape of dotsShape
colorColor of normal dotsColor
indicatorColorColor of current active dotColor

Shape Constructor:

NameUsageType
widthWidth of dot (required if shape is Rectange)double
heightHeight of dot (required if shape is Rectange)double
sizeSize of dot (required if shape is Circle or Square)double
spacingSpacing between dotsdouble
shapeShape of dots. One of Circle, Rectangle and SquareDotShape

Support

Email me at phuchuynh.strong@gmail.com for any support needed

Libraries

dot
shape
worm_indicator
worm_indicator