record method
Save an AppSnapshot to persistent storage.
Implementation
Future<void> record(AppSnapshot snapshot) async {
try {
final prefs = await SharedPreferences.getInstance();
await prefs.setString(_snapshotKey, jsonEncode(snapshot.toJson()));
} catch (e) {
debugPrint('[Trinity] Failed to record snapshot: $e');
}
}