Watch
1
0
Fork
You've already forked nexus
0
forked from Nexus/nexus

show bottom sheets / dialogs / menus based on screen size

Fixes #76
This commit is contained in:
Henry Hiles 2026-10-15 10:20:27 -04:00
commit 76d78596cd
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs
12 changed files with 141 additions and 49 deletions

View file

@ -0,0 +1,7 @@
import "package:material_ui/material_ui.dart";
extension IsDesktop on BuildContext {
/// Whether the window is wide enough for the desktop layout, with the
/// sidebar always visible, menus instead of bottom sheets, etc.
bool get isDesktop => MediaQuery.sizeOf(this).width > 650;
}