mirror of
https://github.com/kuhyx/todo-app.git
synced 2026-11-20 13:52:19 +01:00
Some checks failed
dependency freshness / dependencies on newest stable (push) Has been cancelled
file-length / file length <= 250 lines (push) Has been cancelled
md-naming / markdown naming convention (push) Has been cancelled
release-apk / release (APK) (push) Has been cancelled
repo-contract / repo contract (push) Has been cancelled
crdt_sync_flutter 0.9.0's installAppErrors in main(): uncaught errors and every spinner shown over 1 s (WaitWatch: sync.run, mirror.test) upload to RTDB /todo/errors/<device> with the versionCode, where the PC app-errors ingest files board tickets (kuhyx/utils DOCS-app-errors.md). The app moves to material_ui first: sync_settings_ui 0.8.x and design_system 0.4.x sit on it, and Flutter 3.50 deprecates flutter/material. Pins: crdt_sync 0.14.1, csf 0.9.0, ssui 0.8.3, gda 0.5.1, design_system 0.4.1, image 4.13.1, mcp_dart 2.4.4. file_picker stays 13.3.3, held by data_transfer_flutter 0.2.2 (allowlisted, self-clearing). appRoute takes a route name so each report names its screen; the release build passes APP_BUILD/APP_VERSION. Nothing new on screen. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
50 lines
1.3 KiB
Dart
50 lines
1.3 KiB
Dart
/// A screen's latest result as a glyph in place of a status sentence.
|
|
library;
|
|
|
|
import 'package:material_ui/material_ui.dart';
|
|
|
|
/// One result: what to paint, whether it is a failure, and the old
|
|
/// sentence, kept as the spoken label only.
|
|
class StatusCue {
|
|
/// Creates a cue.
|
|
const StatusCue(this.icon, this.spoken, {this.error = false});
|
|
|
|
/// A success: a check glyph in the accent colour.
|
|
const StatusCue.ok(this.spoken) : icon = Icons.check_circle, error = false;
|
|
|
|
/// A failure: an error glyph in the danger hue.
|
|
const StatusCue.failed(this.spoken) : icon = Icons.error, error = true;
|
|
|
|
/// The glyph painted.
|
|
final IconData icon;
|
|
|
|
/// What a screen reader says.
|
|
final String spoken;
|
|
|
|
/// Whether this is a failure (danger hue) rather than a success.
|
|
final bool error;
|
|
}
|
|
|
|
/// Paints [cue] as a large glyph; colour is the second channel.
|
|
class StatusCueView extends StatelessWidget {
|
|
/// Creates the view.
|
|
const StatusCueView(this.cue, {super.key});
|
|
|
|
/// The result shown.
|
|
final StatusCue cue;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final scheme = Theme.of(context).colorScheme;
|
|
return Align(
|
|
alignment: Alignment.centerLeft,
|
|
child: Icon(
|
|
cue.icon,
|
|
size: 32,
|
|
color: cue.error ? scheme.error : scheme.primary,
|
|
semanticLabel: cue.spoken,
|
|
),
|
|
);
|
|
}
|
|
}
|