chore: add always_put_control_body_on_new_line lint (#28352)

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
shenlong
2026-05-12 00:47:24 +07:00
committed by GitHub
parent 7837d40f57
commit 12f7b2a005
122 changed files with 774 additions and 263 deletions
+9 -3
View File
@@ -115,12 +115,18 @@ final class _ListCodec<T extends Object> extends _MetadataCodec<List<T>> {
List<T>? decode(String raw) {
try {
final decoded = jsonDecode(raw);
if (decoded is! List) return null;
if (decoded is! List) {
return null;
}
final result = <T>[];
for (final item in decoded) {
if (item is! String) return null;
if (item is! String) {
return null;
}
final element = _elementCodec.decode(item);
if (element == null) return null;
if (element == null) {
return null;
}
result.add(element);
}
return result;