worm_indicator 0.2.4

  • Readme
  • Changelog
  • Example
  • Installing
  • 84

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

[0.0.2] - Jan 22 2019.

Initial Release

[0.0.3] - Feb 11 2019.

  • Add worm animation
  • Update README and Example

[0.0.4] - Feb 11 2019

  • Update README

[0.1.0] - Feb 22 2019

  • Add Rectangle Shape
  • Refactor using Shape

[0.1.1] - July 4 2019

  • Update version and README

[0.2.0] - Aug 9 2019

  • Fix bug that display wrong normal dots with Rectangle and Square Shape
  • Fix bug that display wrong animation
  • Clean code
  • Update README

[0.2.1] - Aug 15 2019

[0.2.2] - Aug 20 2019

  • Update CHANGELOG

[0.2.3] - Aug 20 2019

  • Add mounted check before setState in DotInstance
  • Change component into Stateless Widget

[0.2.4] - Aug 20 2019

  • Add animation after scrolling to new page

example/README.md

example #

A new Flutter project.

Getting Started #

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  worm_indicator: ^0.2.4

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:worm_indicator/worm_indicator.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
69
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
84
Learn more about scoring.

We analyzed this package on Oct 23, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.5.1
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.4

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health suggestions

Format lib/worm_indicator.dart.

Run flutter format to format lib/worm_indicator.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test