knight_page_indicator 0.0.3

SDKflutter
Platformandroidioswindowslinuxmacosweb

A simple widget to display indicators embedded with different styles.

A simple widget to display indicators embedded with different styles.

Preview Demo

Video Demo

Usage

Two required arguments are the current and totalCount. Pass the current index to the argument "current" and your total length to the argument "totalCount". You can change the indicator style using the argument "style".

Import Package

import 'package:knight_page_indicator/indicator_style.dart';
import 'package:knight_page_indicator/indicator_attributes.dart';
import 'package:knight_page_indicator/knight_page_indicator.dart';

Basic Indicator Style

IndicatorLayout(
  style: IndicatorStyle.circle,
  attribute: BasicIndicatorAttributes(),
  current: yourCurrentIndex(),
  totalCount: yourLength()
);

Basic Indicator Attributes

AttributesTypeDescription
unselectedBackgroundColorColor?Background color of the unselected / default indicator.
selectedBackgroundColorColor?Background color of the selected / focused indicator.
unselectedBorderColorColor?Border color of the unselected / default indicator.
selectedBorderColorColor?Border color of the selected / focused indicator.
borderSizedouble?Border size of the indicator.
sizedouble?Size of the indicator.
animationDurationDuration?Transition duration between indicators.

Widget Indicator Style

IndicatorLayout(
  style: IndicatorStyle.widget,
  attribute: WidgetIndicatorAttributes(),
  current: yourCurrentIndex(),
  totalCount: yourLength()
);

Widget Indicator Attributes

AttributesTypeDescription
unselectedWidgetWidgetWidget of the unselected / default indicator.
selectedWidgetWidgetWidget of the selected / focused indicator.
sizedouble?Size of the indicator.
animationDurationDuration?Transition duration between indicators.

Author

This plugin is developed by Atirek Pothiwala.