Skip to content

Commit 604d996

Browse files
committed
refactor(widgets): read sheet height with MediaQuery.sizeOf
Five bottom-sheet builders capped their height with MediaQuery.of(context).size.height, which subscribes the sheet to every MediaQuery change — keyboard insets, text scale, brightness, padding — not just size. For a bottom sheet the keyboard case is the one that actually fires. MediaQuery.sizeOf establishes a dependency on size alone. The value read is identical, so there is no behaviour change. Fixes #531 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ER7MeRfgMqxnaKBGDaSRWy
1 parent dedb234 commit 604d996

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

lib/widgets/drink_filter_sheets.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class CategoryFilterSheet extends StatelessWidget {
4949
return Container(
5050
padding: const EdgeInsets.all(16),
5151
constraints: BoxConstraints(
52-
maxHeight: MediaQuery.of(context).size.height * 0.7,
52+
maxHeight: MediaQuery.sizeOf(context).height * 0.7,
5353
),
5454
child: Column(
5555
mainAxisSize: MainAxisSize.min,
@@ -156,7 +156,7 @@ class SortOptionsSheet extends StatelessWidget {
156156
return Container(
157157
padding: const EdgeInsets.all(16),
158158
constraints: BoxConstraints(
159-
maxHeight: MediaQuery.of(context).size.height * 0.7,
159+
maxHeight: MediaQuery.sizeOf(context).height * 0.7,
160160
),
161161
child: Column(
162162
mainAxisSize: MainAxisSize.min,
@@ -233,7 +233,7 @@ class StyleFilterSheet extends StatelessWidget {
233233
return Container(
234234
padding: const EdgeInsets.all(16),
235235
constraints: BoxConstraints(
236-
maxHeight: MediaQuery.of(context).size.height * 0.7,
236+
maxHeight: MediaQuery.sizeOf(context).height * 0.7,
237237
),
238238
child: Column(
239239
mainAxisSize: MainAxisSize.min,
@@ -382,7 +382,7 @@ class VisibilityFilterSheet extends StatelessWidget {
382382
return Container(
383383
padding: const EdgeInsets.all(16),
384384
constraints: BoxConstraints(
385-
maxHeight: MediaQuery.of(context).size.height * 0.7,
385+
maxHeight: MediaQuery.sizeOf(context).height * 0.7,
386386
),
387387
child: Column(
388388
mainAxisSize: MainAxisSize.min,

lib/widgets/festival_menu_sheets.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ class FestivalSelectorSheet extends StatelessWidget {
8585
return Container(
8686
padding: const EdgeInsets.all(16),
8787
constraints: BoxConstraints(
88-
maxHeight: MediaQuery.of(context).size.height * 0.7,
88+
maxHeight: MediaQuery.sizeOf(context).height * 0.7,
8989
),
9090
child: Column(
9191
mainAxisSize: MainAxisSize.min,

0 commit comments

Comments
 (0)