implemented a customizable chat background system with support for patterns, solid colors, and gallery images; added a dedicated settings page with live preview and adjustable blur/dim effects, updated the image cropper to support flexible aspect ratios for wallpapers, and integrated file cleanup logic during account logout.

This commit is contained in:
2026-05-31 19:20:18 +02:00
parent 5ebf5bccdb
commit 6e12da08c0
14 changed files with 771 additions and 14 deletions
+18
View File
@@ -0,0 +1,18 @@
import 'dart:io';
/// Holds filesystem paths that are resolved once during app startup so they can
/// be read synchronously from widget `build()` methods (which cannot await the
/// async `path_provider` lookups). [documentsDir] is populated in `main()`
/// before `runApp`.
class AppPaths {
/// Absolute path to the app's documents directory. Set exactly once during
/// startup; reading it before that completes throws (intentional — surfaces
/// an init-order bug instead of silently using an empty path).
static late final String documentsDir;
/// Persistent location of the user-chosen chat background image. Constant
/// filename, so replacing the image overwrites in place — callers must
/// `evict()` it from the image cache after writing.
static String get chatBackgroundImage =>
'$documentsDir${Platform.pathSeparator}chat_background.img';
}