DynamicScrollSpyWidget constructor

const DynamicScrollSpyWidget({
  1. required List<String> headingList,
  2. required List<Widget> contentList,
  3. TextStyle? headingStyle,
  4. TextStyle? activeHeadingStyle,
  5. EdgeInsets? contentPadding,
  6. EdgeInsets? headingPadding,
  7. double? headingSpacing,
  8. double? contentSpacing,
  9. dynamic onHeadingSelected(
    1. int index
    )?,
  10. dynamic onContentVisible(
    1. int index
    )?,
  11. int navigationFlex = 1,
  12. int contentFlex = 3,
  13. Key? key,
})

Creates a DynamicScrollSpyWidget.

The headingList and contentList must have the same length.

Implementation

const DynamicScrollSpyWidget({
  required this.headingList,
  required this.contentList,
  this.headingStyle,
  this.activeHeadingStyle,
  this.contentPadding,
  this.headingPadding,
  this.headingSpacing,
  this.contentSpacing,
  this.onHeadingSelected,
  this.onContentVisible,
  this.navigationFlex = 1,
  this.contentFlex = 3,
  super.key,
}) : assert(headingList.length == contentList.length,
          'headingList and contentList must have the same length');