CNPageControl constructor

const CNPageControl({
  1. Key? key,
  2. required int numberOfPages,
  3. int currentPage = 0,
  4. ValueChanged<int>? onChanged,
  5. PageController? controller,
  6. Color? pageIndicatorColor,
  7. Color? currentPageIndicatorColor,
  8. CNPageControlBackgroundStyle backgroundStyle = CNPageControlBackgroundStyle.automatic,
  9. bool hidesForSinglePage = false,
  10. bool allowsContinuousInteraction = true,
  11. bool enabled = true,
  12. double height = 28.0,
  13. bool autoHideOnModal = true,
  14. String? semanticLabel,
})

Creates a Cupertino-native page control.

Implementation

const CNPageControl({
  super.key,
  required this.numberOfPages,
  this.currentPage = 0,
  this.onChanged,
  this.controller,
  this.pageIndicatorColor,
  this.currentPageIndicatorColor,
  this.backgroundStyle = CNPageControlBackgroundStyle.automatic,
  this.hidesForSinglePage = false,
  this.allowsContinuousInteraction = true,
  this.enabled = true,
  this.height = 28.0,
  this.autoHideOnModal = true,
  this.semanticLabel,
}) : assert(numberOfPages >= 0, 'CNPageControl.numberOfPages is negative');