Skip to content
pubscout

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.

WASM-ready
$ flutter pub add convex_flutter
Source repository

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.

Works with

Packages commonly used together with convex_flutter: ones it builds on, ones built on it, and its own family.