Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD

flutter flutter logo pageview indicator

builds indication marks for pageview in flutter.

import

import 'package:page_view_indicator/page_view_indicator.dart';

usage

default material behavior

return pageviewindicator(
  pageindexnotifier: pageindexnotifier,
  length: length,
  normalbuilder: (animationcontroller) => circle(
        size: 8.0,
        color: colors.black87,
      ),
  highlightedbuilder: (animationcontroller) => scaletransition(
        scale: curvedanimation(
          parent: animationcontroller,
          curve: curves.ease,
        ),
        child: circle(
          size: 12.0,
          color: colors.black45,
        ),
      ),
);
flutter pageview page indicators 1

custom animations

return pageviewindicator(
  pageindexnotifier: pageindexnotifier,
  length: length,
  normalbuilder: (animationcontroller) => circle(
        size: 8.0,
        color: colors.black87,
      ),
  highlightedbuilder: (animationcontroller) => scaletransition(
        scale: curvedanimation(
          parent: animationcontroller,
          curve: curves.ease,
        ),
        child: circle(
          size: 8.0,
          color: colors.white,
        ),
      ),
);
flutter pageview page indicators 2

custom icons

it’s not just about dots!

return pageviewindicator(
  pageindexnotifier: pageindexnotifier,
  length: length,
  normalbuilder: (animationcontroller) => scaletransition(
        scale: curvedanimation(
          parent: animationcontroller,
          curve: curves.ease,
        ),
        child: icon(
          icons.favorite,
          color: colors.black87,
        ),
      ),
  highlightedbuilder: (animationcontroller) => scaletransition(
        scale: curvedanimation(
          parent: animationcontroller,
          curve: curves.ease,
        ),
        child: icon(
          icons.star,
          color: colors.white,
        ),
      ),
);
flutter pageview page indicators 3

changing the space between the indicators

you can change the padding around the indicators using the indicatorpadding property:

return pageviewindicator(
  pageindexnotifier: pageindexnotifier,
  length: length,
  indicatorpadding: const edgeinsets.all(4.0)
  ...

default is const edgeinsets.all(8.0).

download the full project for this post from the following button

this source is fully free for all time

download as zip


Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD

Top