mirror of
https://github.com/rzuasti/oott.git
synced 2026-07-08 19:21:54 +02:00
Polish frontend: design tokens, theming, AppBar titles, empty/loading states
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>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
5f6f5ad679
commit
9367c359d7
@@ -1,11 +1,10 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../theme/dimens.dart';
|
||||
import '../widgets/device_summary_card.dart';
|
||||
import '../widgets/scanners_status_card.dart';
|
||||
import 'notifications_list.dart';
|
||||
|
||||
const _twoColumnBreakpoint = 700.0;
|
||||
|
||||
class HomeScreen extends StatelessWidget {
|
||||
const HomeScreen({super.key});
|
||||
|
||||
@@ -13,7 +12,7 @@ class HomeScreen extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return LayoutBuilder(
|
||||
builder: (context, constraints) {
|
||||
final isTwoColumn = constraints.maxWidth >= _twoColumnBreakpoint;
|
||||
final isTwoColumn = constraints.maxWidth >= Breakpoints.twoColumn;
|
||||
return isTwoColumn ? _buildTwoColumn() : _buildSingleColumn();
|
||||
},
|
||||
);
|
||||
@@ -24,7 +23,7 @@ class HomeScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(flex: 3, child: NotificationsList()),
|
||||
VerticalDivider(width: 32),
|
||||
VerticalDivider(width: Insets.xxxl),
|
||||
SizedBox(
|
||||
width: 300,
|
||||
child: SingleChildScrollView(
|
||||
@@ -32,7 +31,7 @@ class HomeScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
DeviceSummaryCard(),
|
||||
SizedBox(height: 16),
|
||||
SizedBox(height: Insets.lg),
|
||||
ScannersStatusCard(),
|
||||
],
|
||||
),
|
||||
@@ -47,13 +46,13 @@ class HomeScreen extends StatelessWidget {
|
||||
trailingSlivers: [
|
||||
SliverToBoxAdapter(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(top: 24),
|
||||
padding: EdgeInsets.only(top: Insets.xxl),
|
||||
child: DeviceSummaryCard(),
|
||||
),
|
||||
),
|
||||
SliverToBoxAdapter(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(top: 16, bottom: 20),
|
||||
padding: EdgeInsets.only(top: Insets.lg, bottom: Insets.xl),
|
||||
child: ScannersStatusCard(),
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user