Returns decoded data as List
, decoding it if not already decoded.
This method invokes decodedData and casts the decoded object as a List
.
Note that this method may not be used to return a list of decoded bytes, use
decodeAsBytes instead.
If there is no body data, this method returns null.
If decodedData does not produce a List
that contains a single List
object, this method
throws an HTTPBodyDecoderException.
For a non-Future
variant, see asList.
Source
Future<List<Map<String, dynamic>>> decodeAsList() async { await decodedData; return asList(); }