createBundle method

Future<Bundle> createBundle(
  1. String bundleName, {
  2. String? parentPath,
  3. Map<String, String>? metadata,
})

Creates a new bundle within this project.

Bundles are special items that aggregate other items.

final release = await project.createBundle('release-v1');
await release.addMember(hero.kref);

Implementation

Future<Bundle> createBundle(
  String bundleName, {
  String? parentPath,
  Map<String, String>? metadata,
}) async {
  final baseParent = parentPath ?? '/$name';
  final response = await client.createBundle(baseParent, bundleName, metadata: metadata);
  return Bundle(response, client);
}