What changed, and why it matters
This commit fixes a user-interface bug in the wallet's settings screen. Previously, when the on-screen keyboard appeared, it could cover the bottom of a settings form because the popup sheet was sized using the full screen height. The change subtracts the keyboard area from the available height so the sheet shrinks accordingly, keeping input fields visible and usable. There is no security issue here.
No security action needed. Treat as a normal UI fix and include in routine testing/QA.
Security signals we found
No strong security signals were identified.
Evidence from the diff
In lib/screens/settings.dart, the settings popup sheet now calculates maxHeight as (screen height - bottom view insets) * 0.86 using the sheet’s own BuildContext, rather than screen height * 0.86 using the parent context. This prevents the soft keyboard from obscuring form content in scroll-controlled bottom sheets. It is a straightforward UI/UX fix with no security-relevant code paths touched.
Changed components
lib/screens/settings.dartSettings bottom sheet layoutInspect captured patch +7 / −2
diff --git a/lib/screens/settings.dart b/lib/screens/settings.dart
index 2d2748f..ec076d5 100644
--- a/lib/screens/settings.dart
+++ b/lib/screens/settings.dart
@@ -225,6 +225,11 @@ class _SettingsScreenState extends State<SettingsScreen> {
}
}
+ double _sheetMaxHeight(BuildContext sheetContext) {
+ final media = MediaQuery.of(sheetContext);
+ return (media.size.height - media.viewInsets.bottom) * 0.86;
+ }
+
/// Settings popup chrome, matching Spice's sheets: a handle, an icon + title
/// header, then the form scrolling below (the form carries its own save
/// button and pops on success).
@@ -236,10 +241,10 @@ class _SettingsScreenState extends State<SettingsScreen> {
return showBrandSheet<void>(
context: context,
isScrollControlled: true,
- builder: (_) => SafeArea(
+ builder: (sheetContext) => SafeArea(
top: false,
child: ConstrainedBox(
- constraints: BoxConstraints(maxHeight: MediaQuery.of(context).size.height * 0.86),
+ constraints: BoxConstraints(maxHeight: _sheetMaxHeight(sheetContext)),
child: Padding(
padding: const EdgeInsets.only(top: 10),
child: Column(
Why this scored 21/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.