Skip to content
Preview: the PushFleet API isn't live yet. Join the waitlist

Flutter

The Flutter SDK registers devices from your app with your publishable key. Sending happens from your server.

Add the package:

Terminal window
flutter pub add pushfleet

The plugin asks Apple or Firebase for the token itself, on iOS and Android, so you only pass your user ID.

await PushFleet.configure(publishableKey: "pf_pub_test_…");
await PushFleet.register(userId: "user_8f3k");

Calling register on every launch is safe: the same token updates instead of duplicating.

In live mode, pass a user token your server signed for the signed-in user. See identity verification.

await PushFleet.register(userId: "user_8f3k", userToken: userToken);