Closed
Description
Describe the bug
In a very simple setting, after having toggled backdrop for the first time (to reveal back layer), the front layer becomes non-responsive and toggles backdrop on every front layer click.
To Reproduce
Steps to reproduce the behavior:
Use this code
MaterialApp(
title: 'Backdrop Demo',
home: BackdropScaffold(
appBar: BackdropAppBar(
title: Text("Backdrop Example"),
actions: <Widget>[
BackdropToggleButton(
icon: AnimatedIcons.list_view,
)
],
),
backLayer: Center(
child: Text("Back Layer"),
),
subHeader: BackdropSubHeader(
title: Text("Sub Header"),
),
frontLayer: Center(
child: MaterialButton(
child: Text("Click"),
onPressed: () => print("Clicked!"),
),
),
),
);
- Click anywhere on front layer (nothing should happen)
- Toggle backdrop to reveal back layer
- Toggle backdrop to conceal back layer
- Click anywhere on front layer (back layer is revealed)
- Toggle backdrop again to conceal back layer
- Try to click on front layer button (button cannot be clicked, and backdrop is toggled instead)
Expected behavior
Backdrop should not be toggled from front layer if it is revealed.
Screenshots
Should be clear enough as is.