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

Add a shadow to the front layer #112

Open
lastmeta opened this issue Jan 4, 2022 · 0 comments
Open

Add a shadow to the front layer #112

lastmeta opened this issue Jan 4, 2022 · 0 comments

Comments

@lastmeta
Copy link

lastmeta commented Jan 4, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant