Add this to your package's pubspec.yaml
file:
dependencies:
story_indicator: ^latest
import 'package:story_indicator/story_indicator.dart';
Use like a widget everywhere you want, you can see example in /example
folder.
Container(
padding: const EdgeInsets.all(24),
child: StoryIndicator(
itemCount: itemOfOnBoarding,
currentIndex: currentIndex,
highlightColor: Colors.red,
indicatorSpacing: 8,
interval: const Duration(seconds: 2)
)
)
You can custom some value to change indicator UI
Variable | Description |
---|---|
itemCount | Set number of indicators |
currentIndex | Set and get current indicator index |
interval | Set running interval of indicator |
highlightColor | Set highlight color of indicator |
defaultColor | Set default color of indicator |
indicatorSpacing | Set indicator spacing |
Trần Đạt, Thank you!