Page indicator

Page Indicator:
 
Show the location of the current page in page view that automatically changes by turn the pages by controller and the pages can be controlled from it by press the icons.
Different styles, sizes and states of page indicators are prepared by flutter code in admin panel:
 

Simple page indicator in different styles
Simple page indicator with button in different styles
Number page indicator in different styles
Number page indicator with button in different styles
Number page indicator with button and limitation in different styles


Simple page indicator in different styles:

It is simple page indicator located in:
es_flutter_component/lib/components/es_page_indicator/es_slide_indicator.dart
and is used as:

  EsPageIndicator(
                controller: controller,
                totalPage: totalPage,
              ), 
//   where 
  final PageController controller = PageController(initialPage: 0);
  int totalPage = 7;
  var currentPage;

  @override
  void initState() {
    // TODO: implement initState
    super.initState();
    currentPage = 0;
  }

  void _pageChanged(int index) {
    setState(() {
      currentPage =
          controller.page != null ? controller.page!.round() % totalPage : 0;
    });
  }



Simple page indicator with button in different styles:

It is simple page indicator with button located in:
es_flutter_component/lib/components/es_page_indicator/es_slide_indicator.dart
and is used as:

EsPageIndicator(
controller: controller,
totalPage: totalPage,
hasButton: true,
), 
//where 
final PageController controller = PageController(initialPage: 0);
int totalPage = 7;
var currentPage;

@override
void initState() {
// TODO: implement initState
super.initState();
currentPage = 0;
}

void _pageChanged(int index) {
setState(() {
currentPage =
controller.page != null ? controller.page!.round() % totalPage : 0;
});
}



Number page indicator in different styles:

It is number page indicator located in:
es_flutter_component/lib/components/es_page_indicator/es_number_page_indicator.dart
and is used as:

EsNumberPageIndicator.simple(
controller: controller,
totalPage: totalPage,
), 
//where 
final PageController controller = PageController(initialPage: 0);
int totalPage = 7;
var currentPage;

@override
void initState() {
// TODO: implement initState
super.initState();
currentPage = 0;
}

void _pageChanged(int index) {
setState(() {
currentPage =
controller.page != null ? controller.page!.round() % totalPage : 0;
});
}



Number page indicator with button in different styles:

It is number page indicator with button located in:
es_flutter_component/lib/components/es_page_indicator/es_number_page_indicator.dart
and is used as:

EsPageIndicator(
controller: controller,
totalPage: totalPage,
hasButton: true,
), 
//where 
final PageController controller = PageController(initialPage: 0);
int totalPage = 7;
var currentPage;

@override
void initState() {
// TODO: implement initState
super.initState();
currentPage = 0;
}

void _pageChanged(int index) {
setState(() {
currentPage =
controller.page != null ? controller.page!.round() % totalPage : 0;
});
}



Number page indicator with button and limitation in different styles:


It is number page indicator with button and limitation located in:
es_flutter_component/lib/components/es_page_indicator/es_number_page_indicator.dart
and is used as:

EsNumberPageIndicator.limited(
controller: controller,
totalPage: totalPage,
), 
//where 
final PageController controller = PageController(initialPage: 0);
int totalPage = 7;
var currentPage;

@override
void initState() {
// TODO: implement initState
super.initState();
currentPage = 0;
}

void _pageChanged(int index) {
setState(() {
currentPage =
controller.page != null ? controller.page!.round() % totalPage : 0;
});
}