Skip to content

Add a shadow to the front layer #112

@lastmeta

Description

@lastmeta

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions