getENVContent method
Implementation
Future<String?> getENVContent(String path) async {
debugPrint('[Flutter ENV] Reading .env file: $path');
// debugprint absolute path
debugPrint('[Flutter ENV] Absolute path: ${File(path).absolute.path}');
var projectPath = Directory.current.path;
debugPrint('[Flutter ENV] Project path: $projectPath');
try {
return await File(path).readAsString();
} catch (e) {
debugPrint('**************************');
debugPrint('*** Missing .env file ****');
debugPrint('**************************');
return null;
}
}