pulsar_flutter

Over-the-air updates for Flutter apps through Pulsar.

A Pulsar release for Flutter carries screens built with Remote Flutter Widgets, plus text, JSON config and images. It goes live in the running app, with no store review. Dart code still ships through the App Store and Google Play.

Releases get the same controls as React Native releases on Pulsar: Staging and Production, gradual rollouts, targeting by device, user or store version, scheduling, disable and rollback.

Install

flutter pub add pulsar_flutter

Start Pulsar

Create a Flutter app in the Pulsar dashboard and copy its deployment key.

import 'package:flutter/material.dart';
import 'package:pulsar_flutter/pulsar_flutter.dart';

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await Pulsar.start(const PulsarConfig(
    deploymentKey: '<deployment key>',
    appVersion: '1.0.0', // pubspec version, without +build
    serverUrl: 'https://api.usepulsar.dev',
    checkEvery: Duration(minutes: 15),
  ));
  runApp(const MyApp());
}

Show content from releases

PulsarScreen shows a widget from a release file, and its fallback until one arrives. Screens can import core.widgets and core.material, and send events back to your Dart code.

PulsarScreen(
  library: 'screens/home.rfwtxt',
  widget: 'Home',
  data: {'name': user.firstName},
  fallback: const HomeScreen(),
  onEvent: (name, arguments) {
    if (name == 'checkout') openCheckout();
  },
)

Text, JSON and images from the live release are on Pulsar.instance.pack:

final pack = Pulsar.instance.pack;
final config = pack?.json('config.json');
final banner = pack?.image('images/banner.png');

Pulsar.instance is a ChangeNotifier, so a ListenableBuilder rebuilds when a new release goes live.

Release

Put the release in pulsar_pack/ at your app root, for example pulsar_pack/screens/home.rfwtxt:

import core.widgets;
import core.material;

widget Home = Center(
  child: Column(
    mainAxisSize: "min",
    children: [
      Text(text: "Hello from Pulsar", style: { fontSize: 24.0 }),
      SizedBox(height: 16.0),
      ElevatedButton(onPressed: event "tapped" { }, child: Text(text: "Tap me")),
    ],
  ),
);

Then, from your app root:

npx @novacraft-engineering/pulsar-cli login https://api.usepulsar.dev
npx @novacraft-engineering/pulsar-cli release MyApp-iOS Staging --platform ios

The CLI reads the store version from pubspec.yaml.

Safety

The device checks every file against the release hash before using it, and parses every screen and JSON file first. A release that fails stays off screen, the device keeps the release before it, and the failure shows in the dashboard. Call Pulsar.instance.reportFailure(error) if your own code finds a problem with a release.

Store rules still apply: anything a release can switch on must already be in the store build. Use releases to change content and screens, not to add features the store never reviewed.

Full docs: usepulsar.dev/docs/flutter.

Libraries

pulsar_flutter