ScrollWrapper constructor

const ScrollWrapper(
  1. {Key? key,
  2. required ScrollBuilder builder,
  3. ScrollController? scrollController,
  4. Axis scrollDirection = Axis.vertical,
  5. bool? primary,
  6. bool reverse = false,
  7. VoidCallback? onPromptTap,
  8. double scrollOffsetUntilVisible = 200,
  9. double scrollOffsetUntilHide = 200,
  10. double enabledAtOffset = 500,
  11. bool alwaysVisibleAtOffset = false,
  12. Curve scrollToTopCurve = Curves.fastOutSlowIn,
  13. Duration scrollToTopDuration = const Duration(milliseconds: 500),
  14. Duration promptDuration = const Duration(milliseconds: 500),
  15. Curve promptAnimationCurve = Curves.fastOutSlowIn,
  16. Alignment? promptAlignment,
  17. PromptButtonTheme? promptTheme,
  18. PromptAnimation promptAnimationType = PromptAnimation.size,
  19. 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);