Initial commit

This commit is contained in:
Kazimierz Ciołek
2026-02-19 02:49:29 +01:00
commit 782986a632
148 changed files with 29230 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
import 'dart:convert';
class JsonUtils {
JsonUtils._();
static List<dynamic> safeDecodeList(String? json) {
if (json == null || json.isEmpty) return [];
try {
final decoded = jsonDecode(json);
if (decoded is List) return decoded;
return [];
} catch (_) {
return [];
}
}
static String encodeList(List<Map<String, dynamic>> list) {
return jsonEncode(list);
}
}