Address tester feedback: snackbar, filter dialog, text scaling

- Rule-deleted snackbar now auto-dismisses (persist: false) and snackbar
  actions use a high-contrast colour in both themes
- Add-rule dialog keeps the floating label visible with the keyboard up
- Dismiss focus/keyboard before swapping tab routes
- Repeater status: full-width tiles on phones, no shrink-to-fit values,
  multi-part stats on separate lines, drop "0 days" from durations
- App bar titles respect the system font size instead of scaling down;
  contacts controls grow with text scale; larger nav labels
- Fix duplicated flood value in Japanese duplicates string
This commit is contained in:
zjs81 committed 2026-11-06 21:00:12 -07:00
1 parent 394df3109b
commit 03495effe6
49 files changed
+304 -39

No files matched your search

+3 -6
View File
@@ -1,5 +1,7 @@
import 'package:flutter/material.dart';
/// App bar title that honors the system font size. Long titles are
/// ellipsized instead of being shrunk to fit.
class AdaptiveAppBarTitle extends StatelessWidget {
final String text;
@@ -7,11 +9,6 @@ class AdaptiveAppBarTitle extends StatelessWidget {
@override
Widget build(BuildContext context) {
return LayoutBuilder(
builder: (context, constraints) => SizedBox(
width: constraints.maxWidth,
child: FittedBox(fit: BoxFit.scaleDown, child: Text(text, maxLines: 1)),
),
);
return Text(text, maxLines: 1, overflow: TextOverflow.ellipsis);
}
}
+13
View File
@@ -100,6 +100,11 @@ class _FilterRuleDialogState extends State<_FilterRuleDialog> {
content: SizedBox(
width: 420,
child: SingleChildScrollView(
// The outlined field's floating label is painted above the field's
// box, outside the scroll content bounds. Without top padding the
// viewport clips it (worst when the focused field is scrolled flush
// to the top while the keyboard is open).
padding: const EdgeInsets.only(top: 16),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
@@ -107,6 +112,14 @@ class _FilterRuleDialogState extends State<_FilterRuleDialog> {
TextField(
controller: _controller,
autofocus: true,
// Keep room above the field when it is scrolled into view, so
// the floating label (drawn above the box) is not clipped.
scrollPadding: EdgeInsets.fromLTRB(
20,
16 + MediaQuery.textScalerOf(context).scale(16),
20,
20,
),
minLines: 1,
maxLines: 4,
textInputAction: TextInputAction.done,
+19 -23
View File
@@ -243,7 +243,7 @@ class StatTile extends StatelessWidget {
label.toUpperCase(),
style: MeshTheme.accentLabel(
color: scheme.onSurfaceVariant,
fontSize: 12,
fontSize: 14,
),
maxLines: 2,
overflow: TextOverflow.ellipsis,
@@ -252,30 +252,26 @@ class StatTile extends StatelessWidget {
],
),
const SizedBox(height: 6),
FittedBox(
fit: BoxFit.scaleDown,
alignment: AlignmentDirectional.centerStart,
child: Text.rich(
TextSpan(
text: value,
style: MeshTheme.mono(
fontSize: 17,
fontWeight: FontWeight.w600,
color: scheme.onSurface,
),
children: [
if (unit != null)
TextSpan(
text: ' $unit',
style: MeshTheme.mono(
fontSize: 12,
color: scheme.onSurfaceVariant,
),
),
],
Text.rich(
TextSpan(
text: value,
style: MeshTheme.mono(
fontSize: 20,
fontWeight: FontWeight.w600,
color: scheme.onSurface,
),
maxLines: 1,
children: [
if (unit != null)
TextSpan(
text: ' $unit',
style: MeshTheme.mono(
fontSize: 12,
color: scheme.onSurfaceVariant,
),
),
],
),
softWrap: true,
),
],
),