From b89d6884bd5057099c42fbb4bb123c52fcc3cdf1 Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Mon, 27 Dec 2021 16:43:26 +0100 Subject: [PATCH] chore: Center story images --- lib/pages/add_story/add_story_view.dart | 3 ++- lib/pages/story/story_view.dart | 8 +++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/pages/add_story/add_story_view.dart b/lib/pages/add_story/add_story_view.dart index 214a4676..d02ce9b4 100644 --- a/lib/pages/add_story/add_story_view.dart +++ b/lib/pages/add_story/add_story_view.dart @@ -17,6 +17,7 @@ class AddStoryView extends StatelessWidget { Widget build(BuildContext context) { final video = controller.videoPlayerController; return Scaffold( + backgroundColor: Colors.blueGrey, appBar: AppBar( systemOverlayStyle: SystemUiOverlayStyle.light, backgroundColor: Colors.transparent, @@ -70,7 +71,7 @@ class AddStoryView extends StatelessWidget { ? null : DecorationImage( image: MemoryImage(controller.image!.bytes), - fit: BoxFit.cover, + fit: BoxFit.contain, opacity: 0.75, ), gradient: controller.hasMedia diff --git a/lib/pages/story/story_view.dart b/lib/pages/story/story_view.dart index ff29f0eb..3b9d2396 100644 --- a/lib/pages/story/story_view.dart +++ b/lib/pages/story/story_view.dart @@ -182,9 +182,11 @@ class StoryView extends StatelessWidget { : Container(); } controller.loadingModeOff(); - return Image.memory( - matrixFile.bytes, - fit: BoxFit.cover, + return Center( + child: Image.memory( + matrixFile.bytes, + fit: BoxFit.contain, + ), ); }, ),