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
PackageNotFoundExceptionifid.packageis not found. - Throws a
AssetNotFoundExceptionifid.pathis not found. - Throws an
InvalidInputExceptionifidis an invalid input.
Implementation
Future<String> readAsString(AssetId id, {Encoding encoding = utf8});