write method

Future write(
  1. FileData data
)

Implementation

Future write(FileData data) async {
  if (data?.type == FileDataType.text) {
    return await writeAsString(data._contents);
  } else if (data?.type == FileDataType.binary) {
    return await writeAsBytes(data._bytes);
  }
  throw UnimplementedError(
      'Write not supported for file type ${data?.type}.');
}