simplified code across the app and consolidated duplicated helpers

This commit is contained in:
2026-09-27 17:29:54 +02:00
parent 3e856d0b1c
commit ee1240f71a
155 changed files with 1772 additions and 2546 deletions
+13
View File
@@ -1,3 +1,16 @@
import 'dart:convert';
/// Decodes the JSON payload of a locally rendered notification; null when
/// absent or malformed.
Map<String, dynamic>? decodeNotificationPayload(String? payload) {
if (payload == null || payload.isEmpty) return null;
try {
return jsonDecode(payload) as Map<String, dynamic>;
} on Object {
return null;
}
}
/// Where a tapped notification leads.
sealed class PushTarget {
const PushTarget();