🔥 Awesome Indicator

IMB_KTMYvm

Features

  • Horizontal Scroll Indicator

Support Platforms

  • Flutter Android
  • Flutter iOS
  • Flutter Web
  • Flutter Desktop

Usage

Add the package to pubspec.yaml

dependencies:
  awesome_indicator: ^<latest-version>

After that import the package

import 'package:awesome_indicator/awesome_indicator.dart';

Scroll Indicator

  • Just provide your scroll view ScrollController to AwesomeHorizontalIndicator !
final ScrollController controller = ScrollController();

AwesomeHorizontalIndicator(
  controller: controller,
);

Optional

Size

  • width : width of Indicator
  • height : height of Indicator
  • indicator : Indicator ratio between 0 and 1
AwesomeHorizontalIndicator(
  width : 300,
  height : 8,
  indicator : 0.3,
);

Colors

  • background : backround color of Indicator
  • color : Indicator color
AwesomeHorizontalIndicator(
  backgroud: const Color.fromRGBO(95, 95, 95, 1),
  color : const Color.fromRGBO(255, 255, 255, 1),
);

Box

  • border : Boder of Container
  • radius : BorderRadius of Container
AwesomeHorizontalIndicator(
  border : Border.all(),
  radius : 20,
);

onListener

AwesomeHorizontalIndicator(
  onListener: (int ratio, double position) {},
);

Attribute

Attribute Type Required Description Default Value
controller ScrollController O Scroll listener. -
height double X Total height. 8.0
width double X Total width. Max width
indicator double X Indicator weight. 50%
background Color X Background Color. Hex(#C3C3C3)
color Color X Indicator Color. Hex(#000000)
radius double X Container Radius. Max width
border Border X Container Border. Border.none
onListener Function(int, double) X Listen state(Percentage, Pixel). -

Created by Tyger Github