buildAndProcessPlatforms static method
Implementation
static Future<void> buildAndProcessPlatforms(Set<String> platforms) async {
final isFlutterAvailable = await Helpers.checkFlutterAvailability();
if (!isFlutterAvailable) {
print('🐦 Please install Flutter to proceed.');
return;
}
for (var platform in platforms) {
print('🚀 Building for $platform...');
final buildSuccess = await Kplatforms.buildPlatform(platform);
if (buildSuccess) {
final buildPath = Kplatforms.getBuildPath(platform);
// Upload, generate qr, & notify slack only if platform is not web or linux
if (platform != 'linux' && platform != 'web') {
// Upload build to GitHub or other storage
await promptUploadOption(buildPath);
// Generate QR code and link
await Helpers.generateQrCodeAndLink();
// Notify Slack
await Helpers.notifySlack();
}
print('✅ $platform build completed and ready to share!');
} else {
print('❌ Failed to build for $platform');
}
}
}