From 3c447022d614facbbf0bf5cb9d7e92d19d6fd21c Mon Sep 17 00:00:00 2001 From: Dominik Toton Date: Tue, 9 Apr 2024 13:56:29 +0200 Subject: [PATCH] perf: optimize media query usage to avoid redundant rebuilds --- .../lib/src/responsive/responsive_builder.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/catalyst_voices/packages/catalyst_voices_shared/lib/src/responsive/responsive_builder.dart b/catalyst_voices/packages/catalyst_voices_shared/lib/src/responsive/responsive_builder.dart index 15a7b45f11b..aec88b14208 100644 --- a/catalyst_voices/packages/catalyst_voices_shared/lib/src/responsive/responsive_builder.dart +++ b/catalyst_voices/packages/catalyst_voices_shared/lib/src/responsive/responsive_builder.dart @@ -70,7 +70,7 @@ class ResponsiveBuilder extends StatelessWidget { } T _getResponsiveBreakpoint(BuildContext context) { - final screenWidth = MediaQuery.of(context).size.width; + final screenWidth = MediaQuery.sizeOf(context).width; final breakpointKey = _breakpoints.entries .firstWhere(