패키지, 저장소 및 앱 카테고리 검색

패키지 상세v2.7.1

functions_client

Supabase 함수용 Dart 클라이언트 라이브러리입니다.

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
129만
좋아요
7
Pub 점수
130

패키지 설치

flutter pub add functions_client

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

functions_client 패키지는 Flutter 애플리케이션에서 Supabase Functions와 상호작용할 수 있도록 해주는 Dart 라이브러리입니다. 개발자는 앱에서 직접 서버리스 함수를 호출할 수 있습니다. Supabase 호스팅 함수에 HTTP 요청을 보내는 간단하고 타입 안전한 API를 제공하며, 인증 및 오류 처리를 지원합니다. 서버 관리를 하지 않고도 데이터 처리, 파일 조작, 제3자 통합과 같은 백엔드 로직을 실행하는 데 이상적입니다. 클라이언트는 Supabase의 인증 및 데이터베이스 서비스와 원활하게 통합됩니다.

사용 사례

  • Flutter 앱에서 서버리스 함수 호출하기
  • 서버를 관리하지 않고 백엔드 로직을 실행하는 것
  • Supabase 인증 및 데이터베이스와의 통합
  • 서버리스 함수를 통한 파일 작업 처리
  • 사용자 정의 백엔드 로직을 사용한 워크플로 자동화

주요 기능

  • 형 안전한 함수 호출
  • 내장 인증 지원
  • 오류 처리 및 재시도 메커니즘
  • 크로스 플랫폼 호환성
  • 간단한 HTTP 요청 인터페이스
  • Supabase 생태계와의 통합

적합한 대상

  • Supabase를 사용하는 Flutter 개발자
  • 서버리스 백엔드 로직이 필요한 프로젝트
  • 안전한 함수 실행이 필요한 앱
  • 풀스택 플러터 앱을 개발하는 팀
  • 최소한의 백엔드 인프라를 원하는 개발자

고려 사항

  • 배포된 함수가 있는 Supabase 프로젝트가 필요합니다
  • Supabase에서 인증을 구성해야 합니다
  • Supabase Functions 엔드포인트에 한정
  • 네트워크 연결에 의존
  • 복잡한 서버 측 애플리케이션에는 적합하지 않습니다

원본 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

카테고리

의존성

의존성 목록 4 개

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.