saveMoleculeImage static method
Saves a molecule visualization as a PNG file
Returns the path to the saved file
Implementation
static Future<String> saveMoleculeImage(String smiles, String filePath, {int width = defaultWidth, int height = defaultHeight}) async {
final imageData = await fetchMoleculeImage(smiles, width: width, height: height);
final file = File(filePath);
await file.writeAsBytes(imageData);
return filePath;
}