readFileAsString method
if path (entire Lunix or windows path) is provide, fileName must be null
- returns the text store in file or null if file do not exists
Implementation
Future<String?> readFileAsString({String? fileName, String? path}) async {
File file =
File(validatePath(path) ?? "${await filesPath}$pathJoin$fileName");
return file.existsSync() ? file.readAsStringSync() : null;
}