writeAndRunIcons static method
Implementation
static Future<void> writeAndRunIcons(
RebrandConfig config,
String imagePath,
) async {
final yamlFile = File('assets/rebrand/rebrand_launcher.yaml');
yamlFile.writeAsStringSync(buildLauncherIconYaml(config, imagePath));
print(" 🎨 Running flutter_launcher_icons...");
final result = await Process.run('dart', [
'run',
'flutter_launcher_icons',
'-f',
'assets/rebrand/rebrand_launcher.yaml',
], runInShell: true);
if (result.exitCode != 0) {
throw "Failed to generate launcher icons: ${result.stderr}";
}
}