fluttercommunity / fluttercommunity/backdrop

Add a shadow to the front layer

Open
#112 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Dart
Stars
347
Forks
36
PR merge metrics
No merged PRs in 30d

Description

**Is your feature request related to a problem? Please describe.**
I want my front layer to cast a shadow on the app bar, and the back layer.

**Describe the solution you'd like**
```
BackdropScaffold(
// EXISTING:
frontLayerElevation: 1,
frontLayerBorderRadius: const BorderRadius.only(
topLeft: Radius.circular(8),
topRight: Radius.circular(8),),
...

// DESIRED:
frontLayerBoxShadow: [
BoxShadow(
color: Colors.black,
offset: Offset(0, 1),
blurRadius: 5),],
)
```

**Describe alternatives you've considered**
I attempted a bunch of stuff like this:

```
frontLayer: Stack(children: [
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.only(
topRight: Radius.circular(8.0),
topLeft: Radius.circular(8.0)),
color: Colors.transparent,
boxShadow: [
BoxShadow(
//color: const Color(0x33000000),
color: Colors.black,
offset: Offset(0, 1),
blurRadius: 5),
])
),
child!,
]),
```
However, the shadow was always "inside" the frontLayer, not outside it.
![image](https://user-images.githubusercontent.com/5642485/148095228-b2a26c93-00da-4af1-b57b-0dd66a292aa8.png)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.