From dd72586c4ff7189ee054b0b52f4a158c328b35bb Mon Sep 17 00:00:00 2001 From: Thiago Carvalho Date: Thu, 4 Apr 2024 09:46:34 -0300 Subject: [PATCH 1/2] Update overlay.dart - fixes: NullError: NoSuchMethodError: method not found: 'get$renderObject' on null --- lib/src/components/overlay.dart | 35 +++++++++++++++++---------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/lib/src/components/overlay.dart b/lib/src/components/overlay.dart index b970bf0..b59fc3b 100644 --- a/lib/src/components/overlay.dart +++ b/lib/src/components/overlay.dart @@ -56,29 +56,30 @@ class _ArDriveDropdownState extends State { @override void didChangeDependencies() { - if (mounted) { - WidgetsBinding.instance.addPostFrameCallback((_) { - final renderBox = context.findRenderObject() as RenderBox?; + WidgetsBinding.instance.addPostFrameCallback((_) { + if (!mounted) { + return; + } - final position = renderBox?.localToGlobal(Offset.zero); + final renderBox = context.findRenderObject() as RenderBox?; - if (position != null && widget.calculateVerticalAlignment != null) { - final y = position.dy; + final position = renderBox?.localToGlobal(Offset.zero); - final screenHeight = MediaQuery.of(context).size.height; + if (position != null && widget.calculateVerticalAlignment != null) { + final y = position.dy; - Alignment alignment; + final screenHeight = MediaQuery.of(context).size.height; - alignment = - widget.calculateVerticalAlignment!.call(y > screenHeight / 2); + Alignment alignment; - _anchor = Aligned( - follower: alignment, - target: Alignment.bottomLeft, - ); - } - }); - } + alignment = widget.calculateVerticalAlignment!(y > screenHeight / 2); + + _anchor = Aligned( + follower: alignment, + target: Alignment.bottomLeft, + ); + } + }); super.didChangeDependencies(); } From 0190c3091b5ad0a496e4f6f38258badb0af6503c Mon Sep 17 00:00:00 2001 From: Thiago Carvalho Date: Thu, 4 Apr 2024 09:47:04 -0300 Subject: [PATCH 2/2] Update pubspec.yaml bump version --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index bcd8400..8ee5bf1 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: ardrive_ui description: UI Design Library for the ArDrive Design System -version: 1.18.0 +version: 1.18.1 publish_to: "none"