writeAsString abstract method
Writes contents
to a text file located at id
with encoding
.
Returns a Future that completes after writing the asset out.
- Throws a
PackageNotFoundException
ifid.package
is not found. - Throws an
InvalidOutputException
if the output was not valid (that is,id
is not in allowedOutputs)
NOTE: Most Builder
implementations should not need to await
this
Future since the runner will be responsible for waiting until all outputs
are written.
Implementation
@override
Future<void> writeAsString(AssetId id, FutureOr<String> contents,
{Encoding encoding = utf8});