uploadToPlayStore static method

Future<void> uploadToPlayStore(
  1. String artifactPath
)

Implementation

static Future<void> uploadToPlayStore(String artifactPath) async {
  final config = FlutterReleaseXConfig().config;
  final playStoreConfig = config.uploadOptions.playStore;

  if (!playStoreConfig.enabled) {
    return;
  }

  FlutterReleaseXHelpers.showLoading('📱 Uploading to Google Play Store...');
  final result =
      await FlutterReleaseXPlayStoreUploadService.uploadToPlayStore(
          artifactPath);
  FlutterReleaseXHelpers.stopLoading();

  if (result != null) {
    print('✅ Successfully uploaded to Google Play Store!');
    print('🔗 Release: $result');
  } else {
    print('❌ Failed to upload to Google Play Store.');
  }
}