From 81eafd01c99da3f4f7c0e0f147cd98b983450886 Mon Sep 17 00:00:00 2001 From: Omar Abdullah <36677597+omarabdullah1@users.noreply.github.com> Date: Fri, 5 Jul 2024 15:46:24 +0300 Subject: [PATCH 1/6] Update story_view.dart --- lib/widgets/story_view.dart | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/widgets/story_view.dart b/lib/widgets/story_view.dart index 3a6e8db1..eea14a15 100644 --- a/lib/widgets/story_view.dart +++ b/lib/widgets/story_view.dart @@ -56,6 +56,8 @@ class StoryItem { bool shown = false, bool roundedTop = false, bool roundedBottom = false, + double roundedBottomRadius = 8.0, + double roundedTopRadius = 8.0, EdgeInsetsGeometry? textOuterPadding, Duration? duration, }) { @@ -75,8 +77,8 @@ class StoryItem { decoration: BoxDecoration( color: backgroundColor, borderRadius: BorderRadius.vertical( - top: Radius.circular(roundedTop ? 8 : 0), - bottom: Radius.circular(roundedBottom ? 8 : 0), + top: Radius.circular(roundedTop ? roundedTopRadius : 0), + bottom: Radius.circular(roundedBottom ? roundedBottomRadius : 0), ), ), padding: textOuterPadding?? EdgeInsets.symmetric( From 7a89374f67c43935ea3ded021a475702533f7eed Mon Sep 17 00:00:00 2001 From: Omar Abdullah <36677597+omarabdullah1@users.noreply.github.com> Date: Fri, 5 Jul 2024 15:51:32 +0300 Subject: [PATCH 2/6] Update story_view.dart --- lib/widgets/story_view.dart | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/widgets/story_view.dart b/lib/widgets/story_view.dart index eea14a15..46f3cfec 100644 --- a/lib/widgets/story_view.dart +++ b/lib/widgets/story_view.dart @@ -161,7 +161,7 @@ class StoryItem { /// Shorthand for creating inline image. [controller] should be same instance as /// one passed to the `StoryView` - factory StoryItem.inlineImage({ + factory StoryItem.inlineImage({ required String url, Text? caption, required StoryController controller, @@ -171,6 +171,8 @@ class StoryItem { bool shown = false, bool roundedTop = true, bool roundedBottom = false, + double roundedBottomRadius = 8.0, + double roundedTopRadius = 8.0, Widget? loadingWidget, Widget? errorWidget, EdgeInsetsGeometry? captionOuterPadding, @@ -209,8 +211,8 @@ class StoryItem { ), ), borderRadius: BorderRadius.vertical( - top: Radius.circular(roundedTop ? 8 : 0), - bottom: Radius.circular(roundedBottom ? 8 : 0), + top: Radius.circular(roundedTop ? roundedTopRadius : 0), + bottom: Radius.circular(roundedBottom ? roundedBottomRadius : 0), ), ), shown: shown, From f9c0a271140bfed7fbcb662107b471b98aa38dca Mon Sep 17 00:00:00 2001 From: Omar Abdullah <36677597+omarabdullah1@users.noreply.github.com> Date: Fri, 5 Jul 2024 16:34:07 +0300 Subject: [PATCH 3/6] Update story_view.dart --- lib/widgets/story_view.dart | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/lib/widgets/story_view.dart b/lib/widgets/story_view.dart index 46f3cfec..7a764048 100644 --- a/lib/widgets/story_view.dart +++ b/lib/widgets/story_view.dart @@ -179,12 +179,18 @@ class StoryItem { Duration? duration, }) { return StoryItem( - ClipRRect( - key: key, - child: Container( + Container( color: Colors.grey[100], + borderRadius: BorderRadius.vertical( + top: Radius.circular(roundedTop ? roundedTopRadius : 0), + bottom: Radius.circular(roundedBottom ? roundedBottomRadius : 0), + ), child: Container( color: Colors.black, + borderRadius: BorderRadius.vertical( + top: Radius.circular(roundedTop ? roundedTopRadius : 0), + bottom: Radius.circular(roundedBottom ? roundedBottomRadius : 0), + ), child: Stack( children: [ StoryImage.url( @@ -210,11 +216,6 @@ class StoryItem { ), ), ), - borderRadius: BorderRadius.vertical( - top: Radius.circular(roundedTop ? roundedTopRadius : 0), - bottom: Radius.circular(roundedBottom ? roundedBottomRadius : 0), - ), - ), shown: shown, duration: duration ?? Duration(seconds: 3), ); From c945ec5643ad11a352f0b829446a0c463a3d1ea5 Mon Sep 17 00:00:00 2001 From: Omar Abdullah <36677597+omarabdullah1@users.noreply.github.com> Date: Fri, 5 Jul 2024 16:36:42 +0300 Subject: [PATCH 4/6] Update story_view.dart --- lib/widgets/story_view.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/widgets/story_view.dart b/lib/widgets/story_view.dart index 7a764048..8093110f 100644 --- a/lib/widgets/story_view.dart +++ b/lib/widgets/story_view.dart @@ -180,7 +180,7 @@ class StoryItem { }) { return StoryItem( Container( - color: Colors.grey[100], + color: Colors.transparent, borderRadius: BorderRadius.vertical( top: Radius.circular(roundedTop ? roundedTopRadius : 0), bottom: Radius.circular(roundedBottom ? roundedBottomRadius : 0), From 1aed039693c7b27d2c4e4a522a0340e189c92090 Mon Sep 17 00:00:00 2001 From: Omar Abdullah <36677597+omarabdullah1@users.noreply.github.com> Date: Fri, 5 Jul 2024 17:08:51 +0300 Subject: [PATCH 5/6] Update story_view.dart --- lib/widgets/story_view.dart | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/lib/widgets/story_view.dart b/lib/widgets/story_view.dart index 8093110f..bec819d2 100644 --- a/lib/widgets/story_view.dart +++ b/lib/widgets/story_view.dart @@ -180,17 +180,21 @@ class StoryItem { }) { return StoryItem( Container( - color: Colors.transparent, - borderRadius: BorderRadius.vertical( - top: Radius.circular(roundedTop ? roundedTopRadius : 0), - bottom: Radius.circular(roundedBottom ? roundedBottomRadius : 0), - ), + decoration:BoxDecoration( + color: Colors.transparent, + borderRadius: BorderRadius.vertical( + top: Radius.circular(roundedTop ? roundedTopRadius : 0), + bottom: Radius.circular(roundedBottom ? roundedBottomRadius : 0), + ), + ), child: Container( - color: Colors.black, - borderRadius: BorderRadius.vertical( - top: Radius.circular(roundedTop ? roundedTopRadius : 0), - bottom: Radius.circular(roundedBottom ? roundedBottomRadius : 0), - ), + decoration:BoxDecoration( + color: Colors.black, + borderRadius: BorderRadius.vertical( + top: Radius.circular(roundedTop ? roundedTopRadius : 0), + bottom: Radius.circular(roundedBottom ? roundedBottomRadius : 0), + ), + ), child: Stack( children: [ StoryImage.url( From eb77f0697de126f217cdde74bce81b6d53adb7c1 Mon Sep 17 00:00:00 2001 From: Omar Abdullah <36677597+omarabdullah1@users.noreply.github.com> Date: Fri, 5 Jul 2024 18:04:32 +0300 Subject: [PATCH 6/6] Update story_view.dart --- lib/widgets/story_view.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/widgets/story_view.dart b/lib/widgets/story_view.dart index bec819d2..deef4276 100644 --- a/lib/widgets/story_view.dart +++ b/lib/widgets/story_view.dart @@ -181,7 +181,7 @@ class StoryItem { return StoryItem( Container( decoration:BoxDecoration( - color: Colors.transparent, + color: Colors.green, borderRadius: BorderRadius.vertical( top: Radius.circular(roundedTop ? roundedTopRadius : 0), bottom: Radius.circular(roundedBottom ? roundedBottomRadius : 0),