writeAsString abstract method

Future<void> writeAsString(
  1. AssetId id,
  2. String contents,
  3. {Encoding encoding = utf8}
)
inherited

Writes contents to a text file located at id with encoding.

Returns a Future that completes after writing the asset out.

  • Throws a PackageNotFoundException if id.package is not found.
  • Throws an InvalidOutputException if the output was not valid.

Implementation

Future<void> writeAsString(AssetId id, String contents,
    {Encoding encoding = utf8});