execute method
Future<void>
execute(
)
override
Implementation
@override
Future<void> execute() async {
stdout.write('Please enter the project name:');
String appName = stdin.readLineSync()!;
stdout.write('Please enter the bundle id:');
String bundleId = stdin.readLineSync()!;
print('downloading project...\n');
http.Client client = http.Client();
var req = await client.get(Uri.parse(projectUrl));
print('unzipping...\n');
final archive = ZipDecoder().decodeBytes(req.bodyBytes);
print('please wait...\n');
extractArchiveToDisk(archive, Directory.current.path);
String path;
if (Platform.isMacOS || Platform.isLinux) {
path = '$baseProjectName/';
} else {
path = '.\\$baseProjectName';
}
await ChangeName(appName, path).execute();
await ChangeBundleId(bundleId, path).execute();
await Directory(baseProjectName).rename(appName);
}