google_cloud_storage
0.6.4, released 2 months ago by labs.dart.dev
A Dart client for Google Cloud Storage.
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.
- posthog_flutter
Flutter client for PostHog analytics, feature flags, and session replay
84Compare - cloud_firestore_web
The web implementation of cloud_firestore.
82Compare - googleapis
Auto-generated client libraries for accessing Google APIs.
95Compare - cloud_functions_web
Web implementation of Firebase Cloud Functions for Flutter web apps
78Compare
Works with
Packages commonly used together with google_cloud_storage: ones it builds on, ones built on it, and its own family.
- cryptogoogle_cloud_storage depends on itProvides SHA, MD5, and HMAC hashing functions for Dart.
- clockgoogle_cloud_storage depends on itA fakeable wrapper for dart:core clock APIs.
- ffigoogle_cloud_storage depends on itUtilities for working with Foreign Function Interface (FFI) code in Dart.
- convertgoogle_cloud_storage depends on itEncoders and decoders for converting between different data representations.
- googleapis_authgoogle_cloud_storage depends on itObtain Access credentials and authenticated HTTP clients for Google APIs using OAuth 2.0.
- google_cloudgoogle_cloud_storage depends on itUtilities for running Dart code correctly on the Google Cloud Platform.
- firebase_admin_sdkBuilt on google_cloud_storageFirebase Admin SDK implementation for Dart server environments