getFileContentAsString function

Future<String?> getFileContentAsString(
  1. String fileName, {
  2. String? folder,
})

Reads the content of a user-generated file as a string.

fileName: Name of the file to read. folder: Optional subfolder inside storage.

Returns the file content as a string or null if the file does not exist or fails to read.

Implementation

Future<String?> getFileContentAsString(String fileName,
    {String? folder}) async {
  return _getFileContentAsString(fileName, folder: folder);
}