// ignore_for_file: unused_local_variable import 'package:shorebird_code_push_client/shorebird_code_push_client.dart'; Future main() async { final client = CodePushClient(); // Download the latest stable engine revision. final engine = await client.downloadEngine( revision: '', // e.g. '9aa7816315' ); // List all apps. final apps = await client.getApps(); // Create a new Shorebird application. final app = await client.createApp( displayName: '', // e.g. 'Shorebird Example' ); // Create a channel. final channel = await client.createChannel( appId: app.id, channel: '', // e.g. 'stable' ); // Create a release. final release = await client.createRelease( appId: app.id, version: '', // e.g. '1.0.0' displayName: '', // e.g. 'v1.0.0' ); // Create a release artifact. final releaseArtifact = await client.createReleaseArtifact( releaseId: release.id, artifactPath: '', // e.g. 'libapp.so' platform: '', // e.g. 'android' arch: '', // e.g. 'aarch64' hash: '', // 'sha256 hash of the artifact' ); // Create a new patch. final patch = await client.createPatch(releaseId: release.id); // Create a patch artifact. final patchArtifact = await client.createPatchArtifact( patchId: patch.id, artifactPath: '', // e.g. 'libapp.so' platform: '', // e.g. 'android' arch: '', // e.g. 'aarch64' hash: '', // 'sha256 hash of the artifact' ); // Promote a patch to a channel. await client.promotePatch(patchId: patch.id, channelId: channel.id); // Close the client. client.close(); }