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

패키지 상세v2.13.2

realtime_client

PostgreSQL 데이터베이스 및 웹소켓을 통해 변경 사항을 수신합니다. 이는 Supabase 실시간 서버와 함께 사용하기 위한 것입니다.

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
133만
좋아요
76
Pub 점수
140

패키지 설치

flutter pub add realtime_client

패키지 개요

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

realtime_client 패키지는 웹소켓을 사용하여 PostgreSQL 데이터베이스에서 실시간 업데이트를 수신할 수 있도록 하며, Supabase Realtime 서버와의 통합을 위해 특별히 설계되었습니다. 앱은 삽입, 업데이트, 삭제와 같은 데이터베이스 변경 사항을 실시간으로 감지할 수 있으며, 수동 풀링 없이 클라이언트 간에 데이터가 동기화됩니다. 협업 앱, 채팅 시스템 또는 즉각적인 데이터 새로 고침이 필요한 대시보드에 적합합니다. 이 패키지는 모바일, 웹, 데스크톱을 포함한 모든 주요 플랫폼을 지원하므로 크로스플랫폼 실시간 경험에 적합합니다.

사용 사례

  • 실시간 채팅 애플리케이션
  • 실시간 대시보드 업데이트
  • 협업 편집 도구
  • 즉시 알림 시스템
  • 데이터베이스 변경 모니터링

주요 기능

  • WebSocket 기반 실시간 업데이트
  • Supabase 실시간 서버 통합
  • 크로스 플랫폼 지원
  • 이벤트 기반 데이터 리스닝
  • 자동 재연결 처리

적합한 대상

  • 실시간 기능을 구축하는 개발자
  • 실시간 데이터 동기화가 필요한 앱
  • Supabase 기반 프로젝트
  • 다중 사용자 상호작용 애플리케이션
  • 풀스택 플러터 개발자

고려 사항

  • 실시간 기능이 활성화된 Supabase 프로젝트가 필요합니다
  • WebSocket 통신을 위해 네트워크 연결이 필요합니다
  • 고주파 이벤트와 관련된 성능 영향 가능성
  • 안전한 채널 접근을 위해 인증이 필요합니다
  • Supabase의 실시간 인프라스트럭처에 제한됨

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

카테고리

의존성

의존성 목록 6 개

소스 저장소

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