Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: variable front page height #73

Merged
merged 16 commits into from
Feb 22, 2021
Prev Previous commit
Next Next commit
fix: extract back layer scrim
  • Loading branch information
mockturtl committed Feb 14, 2021
commit d50f5be52741191258fa868b78e4d667cc70fbd0
12 changes: 8 additions & 4 deletions lib/scaffold.dart
Original file line number Diff line number Diff line change
@@ -614,10 +614,7 @@ class BackdropScaffoldState extends State<BackdropScaffold>
fit: StackFit.expand,
children: <Widget>[
_buildBackPanel(),
if (isBackLayerConcealed && widget.frontLayerActiveFactor < 1)
Container(
color: _backLayerScrimColorTween.evaluate(controller),
height: _backPanelHeight),
if (_hasBackLayerScrim) _buildBackLayerScrim(),
PositionedTransition(
rect: _getPanelAnimation(context, constraints),
child: _buildFrontPanel(context),
@@ -649,6 +646,13 @@ class BackdropScaffoldState extends State<BackdropScaffold>
);
}

Container _buildBackLayerScrim() => Container(
color: _backLayerScrimColorTween.evaluate(controller),
height: _backPanelHeight);

bool get _hasBackLayerScrim =>
isBackLayerConcealed && widget.frontLayerActiveFactor < 1;

@override
Widget build(BuildContext context) {
return Backdrop(