offline_protocol, hosts the engine on iOS and Android from Dart. From v0.31.0 it matches the React Native module’s native surface: MeshSdk wraps every native method the React Native module calls, so groups, replicated documents, services, files, identity, telemetry and every transport are reachable from Dart. The plugin compiles the same native bridge sources and links the same generated libraries as React Native, so a transport fix reaches both.
The plugin is a preview and is not on pub.dev. Depend on it by path from a checkout of the SDK repository at the release tag.
Requirements
Add the plugin
Check out the SDK at the release tag and build the mobile libraries, the same steps as the React Native module:pubspec.yaml:
bluetooth-central and bluetooth-peripheral background modes on iOS, and the Bluetooth, location and nearby Wi-Fi runtime permissions on Android. See React Native installation.
On Android, start() runs the same mesh foreground service as React Native, so the device shows its notification while the mesh runs. The plugin’s manifest merges FOREGROUND_SERVICE, FOREGROUND_SERVICE_CONNECTED_DEVICE, CHANGE_WIFI_STATE and a connectedDevice service into your app’s. An app that targets Android 14 or later declares the foreground service type in the Play Console.
On iOS, pod install copies the shared Swift bridge sources into the plugin. If you change those sources, run bindings/flutter/offline_protocol/ios/sync_bridge_rn.sh and pod install again, or the build compiles the old copy.
Quick start
Subscribe to events beforecreateFromConfig if you need every event, including gap recovery through native replay:
createFromConfig takes the React Native configuration, in camelCase or snake_case, and parses it with the same native parser; see configuration. After start() the plugin enables the internet, Nostr (with at least one relay), Reticulum and Wi-Fi Direct transports the configuration turns on, as the React Native JavaScript layer does. The engine runs on one dedicated thread per process, and method-channel results and events are delivered on the main isolate’s platform thread.
The Dart API
MeshSdk covers groups (meshCreateGroup, meshInviteToGroup, meshSendGroupMessage and the rest), replicated documents (dataCreateDoc, dataMapSet, dataListPush, dataTextInsert and the rest), services (registerService, discoverServices, sendServiceRequest, respondToServiceRequest, and from v0.32.0 the subscription calls such as subscribeService, publishServiceUpdate and setServiceSubscriptionPolicy), files and media (sendFileFromPath, sendMedia), connection requests, MLS sessions, invites, signatures, presence, typing and read receipts, relay and routing configuration, custody, and telemetry. Each method takes its arguments as a map and returns the native result. Typed helpers such as sendMessageTyped, getStateTyped, localAddressTyped and internetIsReadyTyped return Dart types, and disableTelemetryAndWait, endTelemetrySessionAndWait and flushTelemetryAndWait complete when the engine thread’s flush does.
The package exports MeshSdk, so an app that declares its own class of that name imports the package with a prefix.
While Dart is not listening, both platforms hold the inbound message events (message_received, file_received, message_decryption_failed, message_delivered and message_failed), up to 256, and deliver them on the next subscription or foreground, as React Native does.
What stays in React Native
The headless wake service (MeshHeadlessWakeService), which restarts mesh work after Android kills the process, is React Native only. Use React Native if your app needs that behaviour. The TypeScript classes React Native layers over its native module, such as DataStore and MeshServices, have no Dart counterpart; call the native methods they wrap through MeshSdk.
CI runs the plugin’s Dart tests and analysis, builds its Android library against a size baseline, and typechecks the iOS plugin together with the shared bridge sources. Parity guards hold the method-channel list, the Android and iOS dispatchers and the Dart manifest to one generated set of 171 methods.
Reference
- Flutter plugin README, including the example app.
- Flutter bridge contract: shared sources, threading, the method channel, event delivery and telemetry.

