BackdropScaffold constructor

BackdropScaffold({
  1. Key? key,
  2. AnimationController? animationController,
  3. required Widget backLayer,
  4. required Widget frontLayer,
  5. Widget? subHeader,
  6. bool subHeaderAlwaysActive = true,
  7. double? headerHeight,
  8. ShapeBorder frontLayerShape = const RoundedRectangleBorder(borderRadius: BorderRadius.only(topLeft: Radius.circular(16), topRight: Radius.circular(16))),
  9. BorderRadius? frontLayerBorderRadius,
  10. double frontLayerElevation = 1,
  11. bool stickyFrontLayer = false,
  12. bool revealBackLayerAtStart = false,
  13. Curve animationCurve = Curves.ease,
  14. Curve? reverseAnimationCurve,
  15. Color? frontLayerBackgroundColor,
  16. double frontLayerActiveFactor = 1,
  17. Color? backLayerBackgroundColor,
  18. Color frontLayerScrim = Colors.white70,
  19. Color backLayerScrim = Colors.black54,
  20. VoidCallback? onBackLayerConcealed,
  21. VoidCallback? onBackLayerRevealed,
  22. bool maintainBackLayerState = true,
  23. GlobalKey<ScaffoldState>? scaffoldKey,
  24. PreferredSizeWidget? appBar,
  25. Widget? floatingActionButton,
  26. FloatingActionButtonLocation? floatingActionButtonLocation,
  27. FloatingActionButtonAnimator? floatingActionButtonAnimator,
  28. List<Widget>? persistentFooterButtons,
  29. Widget? drawer,
  30. DrawerCallback? onDrawerChanged,
  31. Widget? endDrawer,
  32. DrawerCallback? onEndDrawerChanged,
  33. Widget? bottomNavigationBar,
  34. Widget? bottomSheet,
  35. Color? backgroundColor,
  36. bool? resizeToAvoidBottomInset,
  37. bool primary = true,
  38. DragStartBehavior drawerDragStartBehavior = DragStartBehavior.start,
  39. bool extendBody = false,
  40. bool extendBodyBehindAppBar = false,
  41. Color? drawerScrimColor,
  42. double? drawerEdgeDragWidth,
  43. bool drawerEnableOpenDragGesture = true,
  44. bool endDrawerEnableOpenDragGesture = true,
  45. String? restorationId,
})

Creates a backdrop scaffold to be used as a material widget.

Implementation

BackdropScaffold({
  Key? key,
  this.animationController,
  required this.backLayer,
  required this.frontLayer,
  this.subHeader,
  this.subHeaderAlwaysActive = true,
  this.headerHeight,
  ShapeBorder frontLayerShape = const RoundedRectangleBorder(
    borderRadius: BorderRadius.only(
      topLeft: Radius.circular(16),
      topRight: Radius.circular(16),
    ),
  ),
  this.frontLayerBorderRadius,
  this.frontLayerElevation = 1,
  this.stickyFrontLayer = false,
  this.revealBackLayerAtStart = false,
  this.animationCurve = Curves.ease,
  this.reverseAnimationCurve,
  this.frontLayerBackgroundColor,
  double frontLayerActiveFactor = 1,
  this.backLayerBackgroundColor,
  this.frontLayerScrim = Colors.white70,
  this.backLayerScrim = Colors.black54,
  this.onBackLayerConcealed,
  this.onBackLayerRevealed,
  this.maintainBackLayerState = true,
  this.scaffoldKey,
  this.appBar,
  this.floatingActionButton,
  this.floatingActionButtonLocation,
  this.floatingActionButtonAnimator,
  this.persistentFooterButtons,
  this.drawer,
  this.onDrawerChanged,
  this.endDrawer,
  this.onEndDrawerChanged,
  this.bottomNavigationBar,
  this.bottomSheet,
  this.backgroundColor,
  this.resizeToAvoidBottomInset,
  this.primary = true,
  this.drawerDragStartBehavior = DragStartBehavior.start,
  this.extendBody = false,
  this.extendBodyBehindAppBar = false,
  this.drawerScrimColor,
  this.drawerEdgeDragWidth,
  this.drawerEnableOpenDragGesture = true,
  this.endDrawerEnableOpenDragGesture = true,
  this.restorationId,
})  : frontLayerShape = frontLayerBorderRadius != null
          ? RoundedRectangleBorder(borderRadius: frontLayerBorderRadius)
          : frontLayerShape,
      frontLayerActiveFactor = frontLayerActiveFactor.clamp(0, 1).toDouble(),
      super(key: key);