execute method
Future<void>
execute(
)
override
Implementation
@override
Future<void> execute() async {
final effectiveActions = actions ?? _deriveDefaultActions();
if (explicitActions && effectiveActions.isEmpty) {
throw "No actions selected. Use --rename, --label/--app-name, --launcher, or --splash with a valid config.";
}
if (!explicitActions && !config.hasEnabledActions) {
throw "Nothing to rebrand. Enable at least one action in rebrand_config.json.";
}
if (effectiveActions.contains(RebrandAction.rename)) {
_validatePackageName();
}
if (effectiveActions.contains(RebrandAction.label)) {
_validateAppName();
}
if (!explicitActions &&
config.appName != null &&
!effectiveActions.contains(RebrandAction.label)) {
_validateAppName();
}
if (effectiveActions.contains(RebrandAction.launcher)) {
_validateIconPath();
}
if (effectiveActions.contains(RebrandAction.splash)) {
_validateSplashConfig();
}
}