Skip to content

Commit

Permalink
Respect taskbar/softkeys and some other tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
CTalvio committed May 4, 2024
1 parent b87f5f5 commit ad42f6e
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions lib/shared/image_viewer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,14 @@ class _ImageViewerState extends State<ImageViewer> with TickerProviderStateMixin
Animation? animation;
return Stack(
children: [
AppBar(
backgroundColor: Colors.transparent,
systemOverlayStyle: const SystemUiOverlayStyle(
// Forcing status bar to display bright icons even in light mode
statusBarIconBrightness: Brightness.light, // For Android (dark icons)
statusBarBrightness: Brightness.dark, // For iOS (dark icons)
),
),
AnimatedContainer(
duration: const Duration(milliseconds: 400),
color: fullscreen ? Colors.black : Colors.black.withOpacity(slideTransparency),
Expand Down Expand Up @@ -194,7 +202,7 @@ class _ImageViewerState extends State<ImageViewer> with TickerProviderStateMixin
}
}
: null,
// End doubltap zoom
// End doubletap zoom
onVerticalDragEnd: slideZooming
? (details) {
setState(() {
Expand Down Expand Up @@ -383,19 +391,19 @@ class _ImageViewerState extends State<ImageViewer> with TickerProviderStateMixin
opacity: fullscreen ? 0.0 : 1.0,
duration: const Duration(milliseconds: 200),
child: Container(
padding: EdgeInsets.only(top: MediaQuery.of(context).padding.top),
decoration: const BoxDecoration(
gradient: LinearGradient(
begin: Alignment.bottomCenter,
end: Alignment.topCenter,
stops: [0, 0.3, 1],
colors: [
Colors.transparent,
Colors.black12,
Colors.black26,
Colors.black45,
],
),
),
padding: EdgeInsets.only(bottom: MediaQuery.of(context).padding.bottom),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Expand Down Expand Up @@ -428,8 +436,8 @@ class _ImageViewerState extends State<ImageViewer> with TickerProviderStateMixin
stops: [0, 0.3, 1],
colors: [
Colors.transparent,
Colors.black12,
Colors.black26,
Colors.black45,
],
),
),
Expand Down Expand Up @@ -477,7 +485,6 @@ class _ImageViewerState extends State<ImageViewer> with TickerProviderStateMixin
Icons.share_rounded,
semanticLabel: "Share",
color: Colors.white.withOpacity(0.90),
shadows: const <Shadow>[Shadow(color: Colors.black, blurRadius: 50.0), Shadow(color: Colors.black, blurRadius: 50.0)],
),
),
),
Expand Down

0 comments on commit ad42f6e

Please sign in to comment.