Buscar pacotes, repositórios e categorias de apps

Detalhes do pacotev2.8.1

storage_client

Biblioteca cliente Dart para interagir com o Supabase Storage. O Supabase Storage fornece uma interface para gerenciar arquivos armazenados no S3, usando o Postgres para gerenciar permissões.

AndroidiOSWebmacOSWindowsLinux
Downloads em 30 dias
1,3 mi
Curtidas
33
Pontos Pub
140

Instalar pacote

flutter pub add storage_client

Visão geral do pacote

Orientação gerada a partir de informações públicas. Apenas para referência.

O pacote storage_client é uma biblioteca Dart que permite que aplicativos Flutter interajam com o Supabase Storage, um serviço para gerenciar arquivos em armazenamento compatível com S3 com controle de acesso impulsionado por PostgreSQL. Ele fornece métodos para carregar, baixar, listar e excluir arquivos com segurança, aproveitando o sistema de autenticação e permissões do Supabase. Projetado para integração perfeita com projetos Supabase, ele suporta todas as principais plataformas, incluindo móvel, web e desktop. O pacote simplifica o manuseio de arquivos mantendo uma segurança robusta por meio de acesso baseado em funções.

Casos de uso

  • Carregar conteúdo gerado pelo usuário, como imagens ou documentos
  • Gerenciando ativos de aplicativos armazenados no armazenamento em nuvem
  • Implementando compartilhamento seguro de arquivos entre usuários
  • Armazenando e recuperando arquivos de mídia em aplicativos em tempo real
  • Habilitar a entrega dinâmica de conteúdo em aplicativos Flutter

Principais recursos

  • Operações de arquivo seguras por meio da autenticação do Supabase
  • Suporte para backend de armazenamento compatível com S3
  • Compatibilidade multiplataforma (Android, iOS, Web, macOS, Windows, Linux)
  • Integração com o Postgres para permissões granulares
  • API simples para upload, download e listagem de arquivos

Indicado para

  • Aplicativos Flutter usando o Supabase como backend
  • Aplicações que exigem gerenciamento seguro de arquivos
  • Projetos que precisam de armazenamento em nuvem escalável com controle de acesso
  • Desenvolvedores construindo aplicativos com muitos recursos multimídia ou baseados em documentos
  • Equipes já usando o Supabase para autenticação e bancos de dados

Considerações

  • Requer um projeto Supabase com armazenamento habilitado
  • A autenticação deve ser configurada no aplicativo
  • As permissões de acesso a arquivos dependem das políticas do Postgres
  • Limitado à infraestrutura de armazenamento do Supabase
  • Pode ser necessário configuração adicional para configurações personalizadas do S3

README original

Snapshot do README original do repositório-fonte vinculado. Consulte o repositório para o conteúdo mais recente.


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

Categorias

Dependências

Lista de dependências 5 itens

Repositório-fonte

Projetos que usam este pacote

Ainda não há dados.