Merge pull request #280 from ente-io/change-status-bar-color-on-details-screen
Status bar color on details screen on light theme
This commit is contained in:
commit
f59aebfb2e
|
@ -100,34 +100,31 @@ class _DetailPageState extends State<DetailPage> {
|
||||||
" files .");
|
" files .");
|
||||||
_appBarKey = GlobalKey<FadingAppBarState>();
|
_appBarKey = GlobalKey<FadingAppBarState>();
|
||||||
_bottomBarKey = GlobalKey<FadingBottomBarState>();
|
_bottomBarKey = GlobalKey<FadingBottomBarState>();
|
||||||
return SafeArea(
|
return Scaffold(
|
||||||
bottom: false,
|
appBar: FadingAppBar(
|
||||||
child: Scaffold(
|
_files[_selectedIndex],
|
||||||
appBar: FadingAppBar(
|
_onFileDeleted,
|
||||||
_files[_selectedIndex],
|
Configuration.instance.getUserID(),
|
||||||
_onFileDeleted,
|
100,
|
||||||
Configuration.instance.getUserID(),
|
widget.config.mode == DetailPageMode.full,
|
||||||
100,
|
key: _appBarKey,
|
||||||
widget.config.mode == DetailPageMode.full,
|
|
||||||
key: _appBarKey,
|
|
||||||
),
|
|
||||||
extendBodyBehindAppBar: true,
|
|
||||||
body: Center(
|
|
||||||
child: Stack(
|
|
||||||
children: [
|
|
||||||
_buildPageView(),
|
|
||||||
FadingBottomBar(
|
|
||||||
_files[_selectedIndex],
|
|
||||||
_onEditFileRequested,
|
|
||||||
widget.config.mode == DetailPageMode.minimalistic,
|
|
||||||
key: _bottomBarKey,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
|
|
||||||
// backgroundColor: Theme.of(context).colorScheme.onPrimary,
|
|
||||||
),
|
),
|
||||||
|
extendBodyBehindAppBar: true,
|
||||||
|
body: Center(
|
||||||
|
child: Stack(
|
||||||
|
children: [
|
||||||
|
_buildPageView(),
|
||||||
|
FadingBottomBar(
|
||||||
|
_files[_selectedIndex],
|
||||||
|
_onEditFileRequested,
|
||||||
|
widget.config.mode == DetailPageMode.minimalistic,
|
||||||
|
key: _bottomBarKey,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
// backgroundColor: Theme.of(context).colorScheme.onPrimary,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -68,7 +68,10 @@ class FadingAppBarState extends State<FadingAppBar> {
|
||||||
stops: const [0, 0.2, 1],
|
stops: const [0, 0.2, 1],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: _buildAppBar(),
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.only(top: 10),
|
||||||
|
child: _buildAppBar(),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
opacity: _shouldHide ? 0 : 1,
|
opacity: _shouldHide ? 0 : 1,
|
||||||
duration: Duration(milliseconds: 150),
|
duration: Duration(milliseconds: 150),
|
||||||
|
@ -237,11 +240,15 @@ class FadingAppBarState extends State<FadingAppBar> {
|
||||||
return hasError ? oldValue : isLiked;
|
return hasError ? oldValue : isLiked;
|
||||||
},
|
},
|
||||||
likeBuilder: (isLiked) {
|
likeBuilder: (isLiked) {
|
||||||
return Icon(
|
return Padding(
|
||||||
Icons.favorite_border,
|
padding: const EdgeInsets.only(top: 8.0),
|
||||||
color:
|
child: Icon(
|
||||||
isLiked ? Colors.pinkAccent : Colors.white, //same for both themes
|
Icons.favorite_border,
|
||||||
size: 24,
|
color: isLiked
|
||||||
|
? Colors.pinkAccent
|
||||||
|
: Colors.white, //same for both themes
|
||||||
|
size: 24,
|
||||||
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
|
@ -151,30 +151,32 @@ class FadingBottomBarState extends State<FadingBottomBar> {
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return AnimatedOpacity(
|
return SafeArea(
|
||||||
child: Align(
|
child: AnimatedOpacity(
|
||||||
alignment: Alignment.bottomCenter,
|
child: Align(
|
||||||
child: Container(
|
alignment: Alignment.bottomCenter,
|
||||||
decoration: BoxDecoration(
|
child: Container(
|
||||||
gradient: LinearGradient(
|
decoration: BoxDecoration(
|
||||||
begin: Alignment.topCenter,
|
gradient: LinearGradient(
|
||||||
end: Alignment.bottomCenter,
|
begin: Alignment.topCenter,
|
||||||
colors: [
|
end: Alignment.bottomCenter,
|
||||||
Colors.transparent,
|
colors: [
|
||||||
Colors.black.withOpacity(0.6),
|
Colors.transparent,
|
||||||
Colors.black.withOpacity(0.72),
|
Colors.black.withOpacity(0.6),
|
||||||
],
|
Colors.black.withOpacity(0.72),
|
||||||
stops: const [0, 0.8, 1],
|
],
|
||||||
|
stops: const [0, 0.8, 1],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
|
children: children,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
|
||||||
children: children,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
|
opacity: _shouldHide ? 0 : 1,
|
||||||
|
duration: Duration(milliseconds: 150),
|
||||||
),
|
),
|
||||||
opacity: _shouldHide ? 0 : 1,
|
|
||||||
duration: Duration(milliseconds: 150),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue