Supabase Flutter는 Flutter 애플리케이션에 Supabase의 백엔드 서비스를 통합하는 포괄적인 패키지입니다. 최소한의 설정으로 인증, 실시간 데이터베이스 작업 및 클라우드 스토리지를 쉽게 구현할 수 있도록 해줍니다. 보안과 확장성을 고려하여 설계되었으며, Android, iOS, Web, macOS, Windows, Linux 등 다양한 플랫폼을 지원합니다. 이 패키지는 Supabase의 PostgreSQL 데이터베이스, 사용자 관리, 파일 저장소에 대한 접근을 간편하게 만들어 주며, 개발자가 빠르게 강력하고 완전한 앱을 개발할 수 있도록 도와줍니다.
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: