BoxShadow on front layer
In my app, due to the chosen colors, the front- and back layer are not very clearly distinguishable. Therefore, I would like to introduce a BoxShadow on the front layer.
If I change the existing frontLayerElevation on BackdropScaffold, it doesn't seem to have any effect on shadow.
I would expect the shadow to show on top of the front layer, but it is by default showing below it, where it is not visible.
@daadu do you think we could add that? I will prepare a PR...
Are you sure that higher values of frontLayerElevation is not working? Can you share screenshot?
The minimal example with frontLayerElevation: 8 gives just an unchanged UI:
MaterialApp(
home: BackdropScaffold(
frontLayerElevation: 8,
appBar: BackdropAppBar(
title: const Text("Backdrop Example"),
),
backLayer: const Center(
child: Text("Back Layer"),
),
frontLayer: const Center(
child: Text("Front Layer"),
),
),
)
If I additionally set the frontLayerBackgroundColor to Colors.transparent, then I can see something happening:
If I now set the elevation e.g. to 1:
The shadow gets less blurred, which means the elevation is applied correctly actually.
So, when my front layer is white, the shadow is hidden below it, because the shadow is displayed (like always in Material Design) on the bottom-right of the widget.
My goal would be to have the possibility for setting the shadow offset to be e.g. Offset(0, -4) in order to show the shadow on top of the front layer.
Ok, if you think so it is required then do it.