Change cast in json parsing (#137708)

`jsonDecode` decodes lists as `List<Object?>`, so the cast to `List<Object>` fails at runtime in sound null safety mode.
This commit is contained in:
Ivan Inozemtsev
2023-11-06 18:29:07 +01:00
committed by GitHub
parent 3649deb3f6
commit defa4bce0a
2 changed files with 23 additions and 1 deletions

View File

@@ -51,7 +51,7 @@ class BlockHashes {
blockSize: obj['blockSize']! as int,
totalSize: obj['totalSize']! as int,
adler32: Uint32List.view(base64.decode(obj['adler32']! as String).buffer),
md5: (obj['md5']! as List<Object>).cast<String>(),
md5: (obj['md5']! as List<Object?>).cast<String>(),
fileMd5: obj['fileMd5']! as String,
);
}