updateImageGenConfig method
Updates and persists the GenerateImageTool configuration.
Implementation
Future<void> updateImageGenConfig(ImageGenConfig config) async {
_imageGenConfig = config;
notifyListeners();
try {
final prefs = await SharedPreferences.getInstance();
await prefs.setString(_kImageGenConfig, jsonEncode(config.toJson()));
} catch (_) {}
}