パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v2.8.1

storage_client

Supabase Storage とやり取りするためのDartクライアントライブラリです。Supabase Storageは、S3に格納されたファイルを管理するインターフェースを提供し、Postgresを使用して権限を管理します。

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
127万
いいね数
33
Pub ポイント
140

パッケージをインストール

flutter pub add storage_client

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

storage_client パッケージは、Dart ライブラリであり、Flutter アプリケーションが Supabase Storage とやり取りできるようにするものです。Supabase Storage は、PostgreSQL で駆動されるアクセス制御を備えた S3 互換ストレージ上のファイルを管理するためのサービスです。このパッケージは、Supabase の認証および権限システムを利用して、安全にファイルをアップロード、ダウンロード、一覧表示、削除するメソッドを提供します。Supabase プロジェクトとのシームレスな統合を目的としており、モバイル、Web、デスクトップを含むすべての主要プラットフォームをサポートしています。役割ベースのアクセス制御により、堅牢なセキュリティを維持しながら、ファイル処理を簡素化しています。

用途

  • 画像や文書などのユーザー生成コンテンツをアップロードする
  • クラウドストレージに格納されたアプリアセットの管理
  • ユーザー間での安全なファイル共有の実装
  • リアルタイムアプリでのメディアファイルの保存と取得
  • Flutterアプリでの動的コンテンツ配信の有効化

主な機能

  • Supabase認証を介したセキュアなファイル操作
  • S3互換ストレージバックエンドのサポート
  • クロスプラットフォーム互換性(Android、iOS、Web、macOS、Windows、Linux)
  • 詳細な権限のためのPostgresとの統合
  • ファイルのアップロード、ダウンロード、リスト表示用のシンプルな API

適している対象

  • Supabase をバックエンドとして使用する Flutter アプリ
  • セキュアなファイル管理を必要とするアプリケーション
  • スケーラブルなクラウドストレージとアクセス制御を必要とするプロジェクト
  • メディア重視またはドキュメントベースのアプリを開発する開発者
  • チームはすでに認証およびデータベースにSupabaseを使用しています

注意事項

  • ストレージが有効な Supabase プロジェクトが必要です
  • アプリで認証を設定する必要があります
  • ファイルアクセス権限は、Postgresポリシーに依存します
  • Supabaseのストレージインフラ構造に制限される
  • カスタムS3構成のための追加設定が必要になる場合があります

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。


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

カテゴリー

依存関係

依存関係一覧 5 件

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。