writeFile static method
Write content to a file
Implementation
static Future<void> writeFile(String filePath, String content) async {
try {
await File(filePath).writeAsString(content);
} catch (e) {
throw Exception('Failed to write file: $filePath - ${e.toString()}');
}
}