forked from Nexus/nexus
parent
ed2d08ed40
commit
76d78596cd
12 changed files with 141 additions and 49 deletions
7
lib/helpers/extensions/is_desktop.dart
Normal file
7
lib/helpers/extensions/is_desktop.dart
Normal 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;
|
||||
}
|
||||
Loading…
Reference in a new issue