Simplify hiding the appbar
This commit is contained in:
parent
13b1a7ad8b
commit
a8607fd661
|
@ -28,13 +28,12 @@ class MediaView extends HookWidget {
|
||||||
}
|
}
|
||||||
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(
|
appBar: showButtons.value
|
||||||
backgroundColor:
|
? AppBar(
|
||||||
showButtons.value ? Colors.black38 : Colors.transparent,
|
backgroundColor: Colors.black38,
|
||||||
shadowColor: Colors.transparent,
|
shadowColor: Colors.transparent,
|
||||||
leading: showButtons.value ? CloseButton() : Container(),
|
leading: CloseButton(),
|
||||||
actions: showButtons.value
|
actions: [
|
||||||
? [
|
|
||||||
IconButton(
|
IconButton(
|
||||||
icon: Icon(Icons.share),
|
icon: Icon(Icons.share),
|
||||||
tooltip: 'share',
|
tooltip: 'share',
|
||||||
|
@ -45,9 +44,9 @@ class MediaView extends HookWidget {
|
||||||
tooltip: 'download',
|
tooltip: 'download',
|
||||||
onPressed: () {},
|
onPressed: () {},
|
||||||
),
|
),
|
||||||
]
|
],
|
||||||
: null,
|
)
|
||||||
),
|
: null,
|
||||||
extendBodyBehindAppBar: true,
|
extendBodyBehindAppBar: true,
|
||||||
body: GestureDetector(
|
body: GestureDetector(
|
||||||
onTapUp: (details) => showButtons.value = !showButtons.value,
|
onTapUp: (details) => showButtons.value = !showButtons.value,
|
||||||
|
|
Loading…
Reference in New Issue