run method
Runs this command.
The return value is wrapped in a Future if necessary and returned by
CommandRunner.runCommand.
Implementation
@override
void run() async {
var appName = argResults?['name'] as String?;
appName ??= XInput.askValue(
'Enter New App Name:',
null,
validators: [
NonEmptyValidator(),
],
);
final projectDirectoryPath = Directory.current.path;
await UpdateIOSAppNameTaskForIOS(
iosManager: IosManager(Directory('$projectDirectoryPath/ios')),
appName: appName,
).execute();
await UpdateAppNameTaskForAndroid(
androidManager:
AndroidManager(Directory('$projectDirectoryPath/android')),
appName: appName,
).execute();
}