createBucket method

Future<StorageBucketModel> createBucket(
  1. String id, {
  2. String? parentFolderPath,
  3. int? maxAllowedSize,
  4. required String creatorId,
})

Implementation

Future<StorageBucketModel> createBucket(
  String id, {
  String? parentFolderPath,
  int? maxAllowedSize,
  required String creatorId,
}) async {
  if (!_initialized) {
    throw StorageServiceNotInitializedException();
  }
  StorageBucketModel storageBucket = StorageBucketModel(
    id,
    creatorId: creatorId,
    maxAllowedSize: maxAllowedSize,
    parentFolderPath: parentFolderPath,
  );
  return storageBucket;
}