🐛 Fix bugs

This commit is contained in:
2025-09-24 20:52:56 +08:00
parent 5f84751fd5
commit bf4892b34d
8 changed files with 146 additions and 129 deletions

View File

@@ -23,15 +23,3 @@ sealed class SnFilePool with _$SnFilePool {
factory SnFilePool.fromJson(Map<String, dynamic> json) =>
_$SnFilePoolFromJson(json);
}
extension SnFilePoolList on List<SnFilePool> {
static List<SnFilePool> listFromResponse(dynamic data) {
if (data is List) {
return data
.whereType<Map<String, dynamic>>()
.map(SnFilePool.fromJson)
.toList();
}
throw ArgumentError('Unexpected response format: $data');
}
}