🔥 Awesome Indicator
Horizontal | Vertical |
---|---|
Features
- AwesomeIndicator.move
- AwesomeIndicator.fill
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';
AwesomeIndicator
.move
AwesomeIndicator.move(
controller: _controller,
);
.fill
AwesomeIndicator.fill(
controller: _controller,
);
Require
controller
AwesomeIndicator.type(
controller: ScrollController(),
);
Optional
scrollDirection
Default: Axis.horizontal
AwesomeIndicator.type(
scrollDirection: Axis.horizontal,
);
width
Axis.horizontal : maxWidth
Axis.vertical : 8
AwesomeIndicator.type(
width: _width,
);
height
Axis.horizontal : 8
Axis.vertical : maxHeight
AwesomeIndicator.type(
height: _height,
);
indicator
only .move mode
Default: 0.35
- Indicator ratio between 0 and 1
AwesomeIndicator.type(
indicator: 0.35,
);
color
- Indicator Color
AwesomeIndicator.type(
color: _color,
);
background
- Backround color of Indicator
AwesomeIndicator.type(
background: _background,
);
gradient
AwesomeIndicator.type(
gradient: _gradient,
);
backgroundGradient
AwesomeIndicator.type(
backgroundGradient: _backgroundGradient,
);
radius
Default: 8
AwesomeIndicator.type(
radius: 8,
);
margin
AwesomeIndicator.type(
margin: const EdgeInsets.zero,
);
onListener
AwesomeIndicator.type(
onListener: (int ratio, double pixel, Axis direction) {
// indicator Ratio
// indicator Pixel
// ScrollDirection
},
);
isDebug
Default: true
Console log
AwesomeIndicator.type(
isDebug: true,
);
Created by Tyger Github