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