BackdropScaffold constructor
BackdropScaffold({
- Key? key,
- AnimationController? animationController,
- required Widget backLayer,
- required Widget frontLayer,
- Widget? subHeader,
- bool subHeaderAlwaysActive = true,
- double? headerHeight,
- ShapeBorder frontLayerShape = const RoundedRectangleBorder(borderRadius: BorderRadius.only(topLeft: Radius.circular(16), topRight: Radius.circular(16))),
- BorderRadius? frontLayerBorderRadius,
- double frontLayerElevation = 1,
- bool stickyFrontLayer = false,
- bool revealBackLayerAtStart = false,
- Curve animationCurve = Curves.ease,
- Curve? reverseAnimationCurve,
- Color? frontLayerBackgroundColor,
- double frontLayerActiveFactor = 1,
- Color? backLayerBackgroundColor,
- Color frontLayerScrim = Colors.white70,
- Color backLayerScrim = Colors.black54,
- VoidCallback? onBackLayerConcealed,
- VoidCallback? onBackLayerRevealed,
- bool maintainBackLayerState = true,
- GlobalKey<
ScaffoldState> ? scaffoldKey, - PreferredSizeWidget? appBar,
- Widget? floatingActionButton,
- FloatingActionButtonLocation? floatingActionButtonLocation,
- FloatingActionButtonAnimator? floatingActionButtonAnimator,
- Widget? drawer,
- DrawerCallback? onDrawerChanged,
- Widget? endDrawer,
- DrawerCallback? onEndDrawerChanged,
- Widget? bottomSheet,
- Color? backgroundColor,
- bool? resizeToAvoidBottomInset,
- bool primary = true,
- DragStartBehavior drawerDragStartBehavior = DragStartBehavior.start,
- bool extendBody = false,
- bool extendBodyBehindAppBar = false,
- Color? drawerScrimColor,
- double? drawerEdgeDragWidth,
- bool drawerEnableOpenDragGesture = true,
- bool endDrawerEnableOpenDragGesture = true,
- 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);