fix image stale-render on in-place overwrite (T-312)

Image cards, thumbnails, the lightbox, and `clide image show` rendered
via Image.file, whose FileImage keys Flutter's imageCache by (path,
scale) only — so overwriting a file at the same path handed back the
previously decoded frame (hit live re-exporting a wireframe PNG). Add
ClideFileImage, a FileImage that folds mtime + size into ==/hashCode so an
in-place change is a fresh cache key (miss → re-decode), and route the
five Image.file sites through it.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-10 13:25:58 +02:00
co-authored by Claude Opus 4.8
parent 1194527ad5
commit a879238102
9 changed files with 103 additions and 16 deletions
+1
View File
@@ -13,6 +13,7 @@ export 'src/clide_collapser_card.dart';
export 'src/clide_column_hat.dart';
export 'src/clide_code_block.dart';
export 'src/clide_divider.dart';
export 'src/clide_file_image.dart';
export 'src/clide_filter_box.dart';
export 'src/clide_lightbox.dart';
export 'src/clide_markdown.dart';