readAsString abstract method
Returns a Future that completes with the contents of a text asset.
When decoding as text uses encoding
, or utf8 is not specified.
- Throws a
PackageNotFoundException
ifid.package
is not found. - Throws a
AssetNotFoundException
ifid.path
is not found. - Throws an
InvalidInputException
ifid
is an invalid input.
Implementation
Future<String> readAsString(AssetId id, {Encoding encoding = utf8});