updates and bug fixes
This commit is contained in:
parent
8aacce5aa8
commit
351d47b3ff
9 changed files with 419 additions and 64 deletions
13
lib/layout/breakpoints.dart
Normal file
13
lib/layout/breakpoints.dart
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import 'package:flutter/widgets.dart';
|
||||
|
||||
/// Width at/above which the UI switches to a wide, side-by-side layout —
|
||||
/// Material's "expanded" window class, i.e. tablet landscape (iPad). Keyed off
|
||||
/// width rather than raw orientation so a phone in landscape (wide but short)
|
||||
/// stays on the compact layout.
|
||||
const double kWideBreakpoint = 840;
|
||||
|
||||
/// Whether the current window is wide enough for the side-by-side layout.
|
||||
/// Uses [MediaQuery.sizeOf] so callers rebuild only when the size actually
|
||||
/// changes, not on every unrelated MediaQuery update.
|
||||
bool isWideLayout(BuildContext context) =>
|
||||
MediaQuery.sizeOf(context).width >= kWideBreakpoint;
|
||||
Loading…
Add table
Add a link
Reference in a new issue