backdrop icon indicating copy to clipboard operation
backdrop copied to clipboard

Add a shadow to the front layer

Open lastmeta opened this issue 4 years ago • 0 comments

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

lastmeta avatar Jan 04 '22 16:01 lastmeta