JDraggableView constructor

const JDraggableView({
  1. Key? key,
  2. Widget? leading,
  3. Widget title = const SizedBox(),
  4. bool centerTitle = true,
  5. List<Widget>? actions,
  6. bool alwaysShowLeadingAndAction = false,
  7. bool alwaysShowTitle = false,
  8. double headerExpandedHeight = 0.35,
  9. Widget expandedHeader = const SizedBox(),
  10. Widget? expandedHeaderBottomBar,
  11. Color? backgroundColor,
  12. Color? appBarColor,
  13. double curvedBodyRadius = 20,
  14. List<Widget> body = const [],
  15. Widget? drawer,
  16. bool fullyStretchable = false,
  17. double stretchTriggerOffset = 200,
  18. Widget? expandedBody,
  19. double stretchMaxHeight = 0.9,
  20. Widget? bottomSheet,
  21. double bottomNavigationBarHeight = kBottomNavigationBarHeight,
  22. Widget? bottomNavigationBar,
  23. Widget? floatingActionButton,
  24. FloatingActionButtonLocation? floatingActionButtonLocation,
  25. FloatingActionButtonAnimator? floatingActionButtonAnimator,
  26. ScrollPhysics? physics,
  27. ScrollController? controller,
  28. RefreshCallback? onRefresh,
  29. RefreshIndicatorTriggerMode refreshTriggerMode = RefreshIndicatorTriggerMode.onEdge,
  30. Color? refreshBackColor,
  31. Color? refreshColor,
  32. double refreshDisplacement = 40.0,
  33. double refreshStrokeWidth = RefreshProgressIndicator.defaultStrokeWidth,
})

Constructor for the draggable view widget.

Implementation

const JDraggableView(
    {super.key,
    this.leading,
    this.title = const SizedBox(),
    this.centerTitle = true,
    this.actions,
    this.alwaysShowLeadingAndAction = false,
    this.alwaysShowTitle = false,
    this.headerExpandedHeight = 0.35,
    this.expandedHeader = const SizedBox(),
    this.expandedHeaderBottomBar,
    this.backgroundColor,
    this.appBarColor,
    this.curvedBodyRadius = 20,
    this.body = const [],
    this.drawer,
    this.fullyStretchable = false,
    this.stretchTriggerOffset = 200,
    this.expandedBody,
    this.stretchMaxHeight = 0.9,
    this.bottomSheet,
    this.bottomNavigationBarHeight = kBottomNavigationBarHeight,
    this.bottomNavigationBar,
    this.floatingActionButton,
    this.floatingActionButtonLocation,
    this.floatingActionButtonAnimator,
    this.physics,
    this.controller,
    this.onRefresh,
    this.refreshTriggerMode = RefreshIndicatorTriggerMode.onEdge,
    this.refreshBackColor,
    this.refreshColor,
    this.refreshDisplacement = 40.0,
    this.refreshStrokeWidth = RefreshProgressIndicator.defaultStrokeWidth})
    : assert(headerExpandedHeight > 0.0 &&
          headerExpandedHeight < stretchMaxHeight),
      assert(
        (stretchMaxHeight > headerExpandedHeight) && (stretchMaxHeight < .95),
      );