readAsString abstract method

  1. @override
Future<String> readAsString(
  1. AssetId id, {
  2. Encoding encoding = utf8,
})

Reads the text contents of id using encoding.

  • Throws a PackageNotFoundException if id.package is not found.
  • Throws an AssetNotFoundException if id.path is not found.
  • Throws an InvalidInputException if id is an invalid input. An input is invalid if it is a non-public member of a dependency package; for example by default lib contains public assets but test does not.

Implementation

@override
Future<String> readAsString(AssetId id, {Encoding encoding = utf8});