Search packages, repositories and app categories

Package detailsv2.8.1

storage_client

Dart client library to interact with Supabase Storage. Supabase Storage provides an interface for managing Files stored in S3, using Postgres to manage permissions.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
1.3M
Likes
33
Pub points
140

Install package

flutter pub add storage_client

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

The storage_client package is a Dart library that enables Flutter applications to interact with Supabase Storage, a service for managing files in S3-compatible storage with PostgreSQL-driven access control. It provides methods to upload, download, list, and delete files securely, leveraging Supabase's authentication and permission system. Designed for seamless integration with Supabase projects, it supports all major platforms including mobile, web, and desktop. The package simplifies file handling while maintaining robust security through role-based access.

Use cases

  • Uploading user-generated content like images or documents
  • Managing app assets stored in cloud storage
  • Implementing secure file sharing between users
  • Storing and retrieving media files in real-time apps
  • Enabling dynamic content delivery in Flutter apps

Key features

  • Secure file operations via Supabase auth
  • Support for S3-compatible storage backend
  • Cross-platform compatibility (Android, iOS, Web, macOS, Windows, Linux)
  • Integration with Postgres for fine-grained permissions
  • Simple API for upload, download, and listing files

Suitable for

  • Flutter apps using Supabase as backend
  • Applications requiring secure file management
  • Projects needing scalable cloud storage with access control
  • Developers building media-heavy or document-based apps
  • Teams already using Supabase for authentication and databases

Considerations

  • Requires a Supabase project with Storage enabled
  • Authentication must be set up in the app
  • File access permissions depend on Postgres policies
  • Limited to Supabase's storage infrastructure
  • May require additional setup for custom S3 configurations

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.


Supabase Logo

Supabase Flutter

Flutter client library for Supabase.

Guides · Reference Docs · Migration Guides

Build Package License: MIT

Run locally

This repo is a monorepo powered by Melos containing supabase_flutter and its sub-libraries. All packages are located in the packages directory.

To install on a locally developed app:

  • Clone this repo
  • Install Melos globally if you haven't already: dart pub global activate melos
  • Run melos bootstrap or melos bs at the root of the cloned directory to install dependencies
  • Add the target package to your pubspec.yaml file specifying the path.
    supabase_flutter:
      path: <your-path-to-the-local-supabase-flutter-repo>/packages/supabase_flutter
    

Testing your app

The helpers the test suites of these packages run on are published in package:supabase_test, so your tests can build on the same primitives: mock HTTP clients, JWT builders, auth session fixtures and realtime frames. Add the package as a dev dependency:

dev_dependencies:
  supabase_test: ^0.1.0

Then stub the endpoints the code under test talks to and run it against a real SupabaseClient, with no running stack required:

final httpClient = MockSupabaseHttpClient()
  ..stubTable('todos', rows: [
    {'id': 1, 'task': 'Ship it', 'status': false},
  ]);
final supabase = testSupabaseClient(httpClient: httpClient);
addTearDown(supabase.dispose);

final todos = await supabase.from('todos').select();
expect(todos, hasLength(1));

See the supabase_test README for the full guide: stubbing database, rpc, edge function and auth endpoints, asserting on recorded requests, running tests as a signed-in user, and wiring Supabase.initialize in Flutter widget tests.

Testing this repo

The tests for the packages postgrest, supabase_auth, supabase_realtime and supabase_storage run against a local Supabase stack. To run these tests locally you need docker and the Supabase CLI installed.

The single configuration for the stack lives in the supabase directory at the repository root. Start it with:

supabase start

Run the Dart tests within the package directory in packages/<package> with the following command. The -j 1 flag runs the tests not concurrently, which works better since the tests run against the same services.

dart test -j 1

To stop the stack run the following command from the repository root:

supabase stop

Contributing

  • Fork the repo on GitHub
  • Clone the project to your own machine
  • Commit changes to your own branch
  • Push your work back up to your fork
  • Submit a Pull request so that we can review your changes and merge

License

This repo is licensed under MIT.

Resources

Categories

Dependencies

Dependency list 5 items

Source repository

Projects using this package

No data available yet.