From 0f4afb3c2966d9d52bb65400683f2eb627faf453 Mon Sep 17 00:00:00 2001 From: Dominik Toton <166132265+dtscalac@users.noreply.github.com> Date: Tue, 9 Apr 2024 15:17:09 +0200 Subject: [PATCH] perf: optimize media query usage to avoid redundant rebuilds (#398) --- .../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(