ink_page_indicator 0.1.1

  • Readme
  • Changelog
  • Example
  • Installing
  • new68

Ink Page Indicator #

A package that offers various page indicators inlcuding a Flutter implementation of the Ink Page Indicator. See below for more examples.

Ink Page Indicator

Installing #

Add it to your pubspec.yaml file:

  ink_page_indicator: ^0.1.1

Install packages from the command line

flutter packages get

Usage #

As of now there are two PageIndicators: InkPageIndicator and LeapingPageIndicator. You can see examples of them below.

Every PageIndicator requires an instance of PageIndicatorController which is a PageController that you should assign to your PageView. This allows the PageIndicator to calculate the page count and handle page animations properly.

PageIndicatorController controller;

void initState() {
  controller = PageIndicatorController();

// Assign to PageView
  controller: controller,
  children: children,

Ink Page Indicator #

The InkPageIndicator comes with four different styles that you can define using the style parameter:

InkStyle.normal InkStyle.simple InkStyle.transition InkStyle.translate
InkStyle.normal InkStyle.simple InkStyle.translate InkStyle.transition

Example #

  gap: 32,
  padding: 16,
  inactiveColor: Colors.grey.shade500,
  activeColor: Colors.grey.shade700,
  inkColor: Colors.grey.shade400,
  controller: controller,
  style: style,

LeapingPageIndicator #

A PageIndicator that jumps between the each of its items.


Example #

    controller: controller,
    gap: 32,
    padding: 16,
    leapHeight: 32,
    shape: shape,
    activeShape: activeShape,
    inactiveColor: Colors.grey.shade400,
    activeColor: Colors.grey.shade700,

Shapes #

You can specify different IndicatorShapes for inactive and active indicators and the PageIndicator will interpolate between them as exemplified below.

An InkPageIndicator with different shapes using InkStyle.transition
final shape = IndicatorShape(
  width: 12,
  height: 20,
  borderRadius: BorderRadius.circular(0),

final activeShape = IndicatorShape(
  width: 12,
  height: 40,
  borderRadius: BorderRadius.circular(0),

    controller: controller,
    gap: 32,
    padding: 16,
    shape: shape,
    style: InkStyle.transition,
    activeShape: activeShape,
    inactiveColor: Colors.grey.shade400,
    activeColor: Colors.grey.shade700,

Changelog #

0.1.0 #

  • Initial release


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:

  ink_page_indicator: ^0.1.1

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:ink_page_indicator/ink_page_indicator.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Jan 19, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.0
  • pana: 0.13.4
  • Flutter: 1.12.13+hotfix.5

Health suggestions

Format lib/ink_page_indicator.dart.

Run flutter format to format lib/ink_page_indicator.dart.

Format lib/src/animations/animations.dart.

Run flutter format to format lib/src/animations/animations.dart.

Format lib/src/animations/implicit_animation.dart.

Run flutter format to format lib/src/animations/implicit_animation.dart.

Fix additional 15 files with analysis or formatting issues.

Additional issues in the following files:

  • lib/src/base/base.dart (Run flutter format to format lib/src/base/base.dart.)
  • lib/src/base/indicator_data.dart (Run flutter format to format lib/src/base/indicator_data.dart.)
  • lib/src/base/indicator_shape.dart (Run flutter format to format lib/src/base/indicator_shape.dart.)
  • lib/src/base/page_indicator.dart (Run flutter format to format lib/src/base/page_indicator.dart.)
  • lib/src/base/page_indicator_painter.dart (Run flutter format to format lib/src/base/page_indicator_painter.dart.)
  • lib/src/indicators.dart (Run flutter format to format lib/src/indicators.dart.)
  • lib/src/ink_page_indicator/ink_page_indicator.dart (Run flutter format to format lib/src/ink_page_indicator/ink_page_indicator.dart.)
  • lib/src/ink_page_indicator/ink_page_indicator_data.dart (Run flutter format to format lib/src/ink_page_indicator/ink_page_indicator_data.dart.)
  • lib/src/ink_page_indicator/ink_page_indicator_painter.dart (Run flutter format to format lib/src/ink_page_indicator/ink_page_indicator_painter.dart.)
  • lib/src/leaping_page_indicator/leaping_page_indicator.dart (Run flutter format to format lib/src/leaping_page_indicator/leaping_page_indicator.dart.)
  • lib/src/leaping_page_indicator/leaping_page_indicator_data.dart (Run flutter format to format lib/src/leaping_page_indicator/leaping_page_indicator_data.dart.)
  • lib/src/leaping_page_indicator/leaping_page_indicator_painter.dart (Run flutter format to format lib/src/leaping_page_indicator/leaping_page_indicator_painter.dart.)
  • lib/src/src.dart (Run flutter format to format lib/src/src.dart.)
  • lib/src/util/pressure_path.dart (Run flutter format to format lib/src/util/pressure_path.dart.)
  • lib/src/util/util.dart (Run flutter format to format lib/src/util/util.dart.)


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
meta ^1.1.8 1.1.8
Transitive dependencies
collection 1.14.11 1.14.12
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies