From a529de22634fea548ff38748caa318019eb59379 Mon Sep 17 00:00:00 2001 From: th3lastb1t <96845033+the-lastbit@users.noreply.github.com> Date: Fri, 22 Sep 2023 02:03:04 -0600 Subject: [PATCH 1/2] Update glass_hover_effect.dart Add fix for rounded corners in the BackDropFilter --- lib/01_glass_hover/glass_hover_effect.dart | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/01_glass_hover/glass_hover_effect.dart b/lib/01_glass_hover/glass_hover_effect.dart index 48586e2..f767f0e 100644 --- a/lib/01_glass_hover/glass_hover_effect.dart +++ b/lib/01_glass_hover/glass_hover_effect.dart @@ -46,9 +46,7 @@ class _GlassHoverEffectState extends State child: MouseRegion( onEnter: (event) => _controller.forward(), onExit: (event) => _controller.reverse(), - child: ClipRRect( - clipBehavior: Clip.hardEdge, - child: SizedBox( + child: SizedBox( height: 420, width: 320, child: Stack( @@ -66,6 +64,7 @@ class _GlassHoverEffectState extends State position: _animation, child: ClipRRect( clipBehavior: Clip.hardEdge, + borderRadius: const BorderRadius.all(Radius.circular(25)), child: BackdropFilter( filter: ImageFilter.blur(sigmaX: 6, sigmaY: 6), child: Padding( @@ -131,7 +130,6 @@ class _GlassHoverEffectState extends State ], ), ), - ), ), ), ); From 5ce63d52f6c0bb72bf9a5d05b38759c5feffcc1b Mon Sep 17 00:00:00 2001 From: th3lastb1t <96845033+the-lastbit@users.noreply.github.com> Date: Sat, 2 Dec 2023 00:12:24 -0600 Subject: [PATCH 2/2] Update glass_hover_effect.dart MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sorry man, I didn't see the message about my mistake, forgot to wrap the SizedBox with another ClipRect because I was debugging in a phone and the narrow screen didn't show the text in the right side 😅, But now it works. --- lib/01_glass_hover/glass_hover_effect.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/01_glass_hover/glass_hover_effect.dart b/lib/01_glass_hover/glass_hover_effect.dart index f767f0e..a7a0628 100644 --- a/lib/01_glass_hover/glass_hover_effect.dart +++ b/lib/01_glass_hover/glass_hover_effect.dart @@ -46,7 +46,9 @@ class _GlassHoverEffectState extends State child: MouseRegion( onEnter: (event) => _controller.forward(), onExit: (event) => _controller.reverse(), - child: SizedBox( + child: ClipRect( + clipBehavior: Clip.hardEdge, + child: SizedBox( height: 420, width: 320, child: Stack( @@ -130,6 +132,7 @@ class _GlassHoverEffectState extends State ], ), ), + ), ), ), );