From 53cb24caad2ff1fba6dc5a3a7feddc0067c7e657 Mon Sep 17 00:00:00 2001 From: Harsh Bhikadia Date: Sun, 19 Dec 2021 15:43:55 +0530 Subject: [PATCH] feat(scaffold): added `double frontLayerElevation` member (#109) Closes #94 --- lib/src/scaffold.dart | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/src/scaffold.dart b/lib/src/scaffold.dart index ff0d850..c80d2ea 100644 --- a/lib/src/scaffold.dart +++ b/lib/src/scaffold.dart @@ -113,6 +113,11 @@ class BackdropScaffold extends StatefulWidget { /// ``` final BorderRadius frontLayerBorderRadius; + /// Defines the elevation applied to the front layer. + /// + /// Defaults to 1. + final double frontLayerElevation; + /// Indicates the front layer should minimize to the back layer's bottom edge. /// /// Otherwise, see [headerHeight] to specify this value. @@ -290,6 +295,7 @@ class BackdropScaffold extends StatefulWidget { topLeft: Radius.circular(16), topRight: Radius.circular(16), ), + this.frontLayerElevation = 1, this.stickyFrontLayer = false, this.revealBackLayerAtStart = false, this.animationCurve = Curves.ease, @@ -538,7 +544,7 @@ class BackdropScaffoldState extends State Widget _buildFrontPanel(BuildContext context) { return Material( color: widget.frontLayerBackgroundColor, - elevation: 1, + elevation: widget.frontLayerElevation, borderRadius: widget.frontLayerBorderRadius, child: ClipRRect( borderRadius: widget.frontLayerBorderRadius,