From 307eaccc3ecd395a7c74ab59d602983b4c12c6c3 Mon Sep 17 00:00:00 2001 From: flemming-it Date: Mon, 1 Jun 2026 01:57:52 +0200 Subject: [PATCH] feat(editor): success snackbar after save MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Brief 1.5 s green-check snackbar appears at the bottom of the editor after a successful save. Confirmation matters here because Cmd+S is the operator's most common keystroke in any editor — without visible feedback, they'd need to hunt for the dirty dot to verify the save landed. The error path's existing snackbar (which has no duration cap by design — operators must read errors) stays unchanged. Signed-off-by: flemming-it --- lib/src/flow_editor_page.dart | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/lib/src/flow_editor_page.dart b/lib/src/flow_editor_page.dart index 191b93b..e34eec2 100644 --- a/lib/src/flow_editor_page.dart +++ b/lib/src/flow_editor_page.dart @@ -192,6 +192,25 @@ class _FlowEditorPageState extends State _controller.markSaved(); _files = _listFiles(); setState(() {}); + // Brief positive feedback. Confirmation matters more + // here than on most save buttons because the operator + // can also save via Cmd+S without watching the dirty + // dot — a tiny green snackbar tells them the + // keystroke landed. + ScaffoldMessenger.of(context).showSnackBar( + SnackBar( + duration: const Duration(milliseconds: 1500), + behavior: SnackBarBehavior.floating, + content: Row( + mainAxisSize: MainAxisSize.min, + children: [ + const Icon(Icons.check_circle_outline, size: 16), + const SizedBox(width: FaiSpace.sm), + Text('$name.yaml ${_l.save.toLowerCase()}'), + ], + ), + ), + ); } catch (e) { if (!mounted) return; ScaffoldMessenger.of(