PageViewIndicator constructor

PageViewIndicator({
  1. Key? key,
  2. required ValueNotifier<int> pageIndexNotifier,
  3. required int length,
  4. required IndicatorBuilder normalBuilder,
  5. required IndicatorBuilder highlightedBuilder,
  6. int currentPage = 0,
  7. EdgeInsets indicatorPadding = const EdgeInsets.all(8.0),
  8. MainAxisAlignment alignment = MainAxisAlignment.center,
})

pageIndexNotifier is how we can properly handle page changes. length is how much pages there is in the PageView. normalBuilder is how we should build the Indicator at its normal state. highlightedBuilder is how we should build the Indicator at its highlighted state. currentPage gives you the ability to star the Indicator at a given index. indicatorPadding space around each Indicator.

Implementation

PageViewIndicator({
  Key? key,
  required this.pageIndexNotifier,
  required this.length,
  required this.normalBuilder,
  required this.highlightedBuilder,
  this.currentPage = 0,
  this.indicatorPadding = const EdgeInsets.all(8.0),
  this.alignment = MainAxisAlignment.center,
}) : super(key: key);