Skip to content
pubscout

google_cloud_storage

0.6.4, released 2 months ago by labs.dart.dev

A Dart client for Google Cloud Storage.

WASM-ready
$ flutter pub add google_cloud_storage
Source repository

What it does

Allows interacting with Google Cloud Storage to manage buckets and upload, download, or modify objects. Uses Application Default Credentials for authentication.

AI-written summary of version 0.6.4, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to access Google Cloud Storage from a Dart or Flutter application.
  • You want to programmatically create buckets, upload files, and manage object metadata.

Skip it when

  • You need local device storage rather than a cloud-hosted storage service.
  • You want a stable package since this one is currently experimental and subject to breaking changes.

Strengths

  • Official Google Cloud client support for buckets and objects.
  • Built-in automatic retry handling for idempotent operations.
  • Supports multiple platforms including Android, iOS, web, Windows, macOS, and Linux.

Weaknesses

  • Currently experimental and published under labs.dart.dev with a high expected rate of API and breaking changes.
  • Requires proper cloud authentication setup outside of Google Cloud.

Setup

Kind
FFI (native library)
Effort
Medium
Code generation
No
Direct dependencies
11

Requires setting up authentication (Application Default Credentials) when used outside of Google Cloud.

import 'package:google_cloud_storage/google_cloud_storage.dart';

void main() async {
  final storage = Storage();
  final bucket = await storage.createBucket(
    BucketMetadata(name: 'put-your-bucket-name-here'),
  );
  storage.close();
}

Alternatives

Packages that do the same job and could replace google_cloud_storage.

Works with

Packages commonly used together with google_cloud_storage: ones it builds on, ones built on it, and its own family.