Skip to content

Commit

Permalink
perf: optimize media query usage to avoid redundant rebuilds
Browse files Browse the repository at this point in the history
  • Loading branch information
dtscalac committed Apr 9, 2024
1 parent 6e6f950 commit 3c44702
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class ResponsiveBuilder<T extends Object> extends StatelessWidget {
}

T _getResponsiveBreakpoint(BuildContext context) {
final screenWidth = MediaQuery.of(context).size.width;
final screenWidth = MediaQuery.sizeOf(context).width;

final breakpointKey = _breakpoints.entries
.firstWhere(
Expand Down

0 comments on commit 3c44702

Please sign in to comment.