convex_flutter
3.0.1, released 9 months ago by jkuldev.com
Multi-platform client for Convex backend integration with real-time WebSockets and subscriptions.
What it does
Provides a Dart and Flutter interface over the Convex backend to run queries, mutations, and actions, and to subscribe to real-time updates. It supports web using pure Dart and native platforms using Rust FFI.
AI-written summary of version 3.0.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You are building a Flutter application backed by Convex.
- You need real-time data synchronization via WebSocket subscriptions.
- You require cross-platform support including web and native mobile/desktop.
Skip it when
- Your backend is not Convex (e.g., using Firebase or Supabase instead).
- You want to avoid the native Rust toolchain dependencies for desktop/mobile builds.
Strengths
- Full multi-platform support including pure Dart web implementation and native FFI.
- Real-time query subscriptions and connection state monitoring streams.
- Automatic token refresh and authentication state management.
Weaknesses
- Requires Rust toolchain and platform-specific build toolchains for native builds.
- Platform-specific network entitlements/permissions must be manually configured for Android and macOS.
Setup
- Kind
- Plugin (native code)
- Effort
- Medium
- Code generation
- Yes (build_runner)
- Direct dependencies
- 5
Requires adding pub dependency, plus Rust toolchain and platform toolchains for native platforms. Android needs INTERNET permission and macOS needs network client/server entitlements.
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
await ConvexClient.initialize(
ConvexConfig(
deploymentUrl: 'https://my-app.convex.cloud',
clientId: 'flutter-app-1.0',
),
);
runApp(MyApp());
}Alternatives
Packages that do the same job and could replace convex_flutter.
- supabase_flutter
Flutter client for Supabase providing auth, database, realtime, storage and edge functions.
92Compare - gotrue
Dart client for Supabase Auth API
85Compare - pocketbase
Multi-platform Dart SDK for PocketBase open-source backend
88Compare - flutter_better_auth
Dart and Flutter client for the Better Auth platform.
77Compare
Works with
Packages commonly used together with convex_flutter: ones it builds on, ones built on it, and its own family.
- webconvex_flutter depends on itLightweight bindings for browser APIs via JS interop
- plugin_platform_interfaceconvex_flutter depends on itReusable base class for platform interfaces of Flutter federated plugins.
- freezed_annotationconvex_flutter depends on itAnnotations for the freezed code-generator.
- flutter_rust_bridgeconvex_flutter depends on itFlutter/Dart and Rust binding generator