readAsString method

Future<String> readAsString(
  1. {void onBlobMetadata(
    1. BlobMetadata metadata

Reads the blob as a string.

Optional callback onBlobMetadata, when non-null, will be invoked exactly once before the future is completed (unless an error occurs).


Future<String> readAsString({
  void Function(BlobMetadata metadata) onBlobMetadata,
}) async {
  final bytes = await readAsBytes(
    onBlobMetadata: onBlobMetadata,
  return const Utf8Decoder().convert(bytes);