execute method
Future<void>
execute(
)
override
Implementation
@override
Future<void> execute() async {
// Ensure assets/rebrand directory exists
final rebrandDir = Directory('assets/rebrand');
if (!rebrandDir.existsSync()) {
rebrandDir.createSync(recursive: true);
}
// Generate rename info file for reference
if (config.packageName != null) {
_writeRenameYaml(config.packageName!);
}
if (config.splash != null) {
final splashImagePath = _prepareSplashImage(
config.splashImagePath,
'assets/rebrand/rebrand_splash_padded.png',
);
final splashDarkImagePath = _prepareSplashImage(
config.splashDarkImagePath,
'assets/rebrand/rebrand_splash_dark_padded.png',
);
final android12ImagePath = _prepareSplashImage(
config.android12ImagePath,
'assets/rebrand/rebrand_splash_android12_padded.png',
);
final android12DarkImagePath = _prepareSplashImage(
config.android12DarkImagePath,
'assets/rebrand/rebrand_splash_android12_dark_padded.png',
);
if (splashImagePath != null && android12ImagePath != null) {
await _writeAndRunSplash(
imagePath: splashImagePath,
darkImagePath: splashDarkImagePath,
android12ImagePath: android12ImagePath,
android12DarkImagePath: android12DarkImagePath,
);
}
}
if (config.iconPath != null) {
await _writeAndRunIcons(config.iconPath!);
}
}