ScrollWrapper constructor
const
ScrollWrapper(
- {Key? key,
- required ScrollBuilder builder,
- ScrollController? scrollController,
- Axis scrollDirection = Axis.vertical,
- bool? primary,
- bool reverse = false,
- VoidCallback? onPromptTap,
- double scrollOffsetUntilVisible = 200,
- double scrollOffsetUntilHide = 200,
- double enabledAtOffset = 500,
- bool alwaysVisibleAtOffset = false,
- Curve scrollToTopCurve = Curves.fastOutSlowIn,
- Duration scrollToTopDuration = const Duration(milliseconds: 500),
- Duration promptDuration = const Duration(milliseconds: 500),
- Curve promptAnimationCurve = Curves.fastOutSlowIn,
- Alignment? promptAlignment,
- PromptButtonTheme? promptTheme,
- PromptAnimation promptAnimationType = PromptAnimation.size,
- ReplacementBuilder? promptReplacementBuilder}
Implementation
const ScrollWrapper({
Key? key,
required this.builder,
this.scrollController,
this.scrollDirection = Axis.vertical,
bool? primary,
this.reverse = false,
this.onPromptTap,
this.scrollOffsetUntilVisible = 200,
this.scrollOffsetUntilHide = 200,
this.enabledAtOffset = 500,
this.alwaysVisibleAtOffset = false,
this.scrollToTopCurve = Curves.fastOutSlowIn,
this.scrollToTopDuration = const Duration(milliseconds: 500),
this.promptDuration = const Duration(milliseconds: 500),
this.promptAnimationCurve = Curves.fastOutSlowIn,
this.promptAlignment,
this.promptTheme,
this.promptAnimationType = PromptAnimation.size,
this.promptReplacementBuilder,
}) : assert(
!(scrollController != null && primary == true),
'Primary ScrollViews obtain their ScrollController via inheritance from a PrimaryScrollController widget. '
'You cannot both set primary to true and pass an explicit controller.',
),
primary = primary ??
scrollController == null &&
identical(scrollDirection, Axis.vertical),
super(key: key);