readFileAsString method
Reads the file and returns its UTF-8 content.
Returns null when the file does not exist.
Implementation
Future<String?> readFileAsString({String? fileName, String? path}) async {
final String resolved = await _resolvePath(fileName, path);
final File file = File(resolved);
if (!file.existsSync()) return null;
return file.readAsStringSync();
}