readFile function
Implementation
Future<String?> readFile(String path, {bool throwExceptionIfExist = false}) async {
try {
final Directory directory = Directory.current;
final File file = File('${directory.path}/$path');
String content = await file.readAsString();
return content;
} catch (e) {
if (throwExceptionIfExist) rethrow;
return null;
}
}