mirror of
https://github.com/rzuasti/oott.git
synced 2026-07-08 19:21:54 +02:00
Frontend usability and aesthetics pass across web and mobile: - Add shared layout tokens (theme/dimens.dart: Insets + Breakpoints) and replace magic-number spacing and per-file breakpoint consts. - Route both themes through buildAppTheme (theme/theme_builder.dart): explicit useMaterial3 and a shared branded textTheme (Barlow Condensed for display/headline/title styles); logo now reads its style from the theme. - Move screen titles into the shared AppBar (route-derived) and drop the redundant in-body headers; upgrade Settings buttons to M3 FilledButton. - Add reusable EmptyState and skeleton loaders; Devices empty state links to scanner status, notifications get filter-aware messages. - Add a first-run welcome intro and Save-disabled helper text in Settings. - Make device Filter/Sort adaptive: bottom sheet on phones, dialog on wide. - Collapse the device-list filter chips and Sort/Filter buttons into one row; rename the home Scanners card title and align its style. Tests: add EmptyState/skeleton widget tests and Settings first-run cases; update tests for the FilledButton swap and relocated titles. 89 passing, dart analyze clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
29 lines
999 B
Dart
29 lines
999 B
Dart
/// Shared layout tokens for consistent spacing and responsive breakpoints.
|
|
///
|
|
/// Use these instead of hand-written magic numbers so spacing stays uniform
|
|
/// across screens and breakpoints are defined in a single place.
|
|
library;
|
|
|
|
/// Spacing scale (logical pixels). Used for padding, margins and gaps.
|
|
abstract final class Insets {
|
|
static const double xs = 4;
|
|
static const double sm = 8;
|
|
static const double md = 12;
|
|
static const double lg = 16;
|
|
static const double xl = 20;
|
|
static const double xxl = 24;
|
|
static const double xxxl = 32;
|
|
}
|
|
|
|
/// Responsive layout breakpoints, aligned with Material 3 window size classes.
|
|
abstract final class Breakpoints {
|
|
/// Compact → medium: switch from bottom NavigationBar to NavigationRail.
|
|
static const double medium = 600;
|
|
|
|
/// Medium → expanded: extend the NavigationRail with labels.
|
|
static const double expanded = 840;
|
|
|
|
/// Home screen switches to its two-column layout at this width.
|
|
static const double twoColumn = 700;
|
|
}
|