DynamicScrollSpyWidget constructor
const
DynamicScrollSpyWidget({
- required List<
String> headingList, - required List<
Widget> contentList, - TextStyle? headingStyle,
- TextStyle? activeHeadingStyle,
- EdgeInsets? contentPadding,
- EdgeInsets? headingPadding,
- double? headingSpacing,
- double? contentSpacing,
- dynamic onHeadingSelected(
- int index
- dynamic onContentVisible(
- int index
- int contentFlex = 3,
- 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');