shorebird_updater 1.1.5 copy "shorebird_updater: ^1.1.5" to clipboard
shorebird_updater: ^1.1.5 copied to clipboard

Flutter package to integrate Shorebird Code Push updates with customizable UI.

Shorebird Updater #

A beautiful, drop-in Flutter package that adds a polished update UI on top of Shorebird Code Push.

It automatically uses your app's name and logo in every dialog — no extra configuration required. Just wrap your app and it checks for updates on launch, then guides the user through downloading and applying the update.

Features #

  • ✅ Automatic update check on launch
  • 🏷️ Auto-detects your app name (via package_info_plus)
  • 🖼️ Uses your app logo (or a sensible fallback icon)
  • ⬇️ Download + restart flow with ready-made dialogs
  • 🎨 Fully customizable titles, messages and button text
  • 🔒 Force-update support

Installation #

Add to your pubspec.yaml:

dependencies:
  shorebird_updater: ^1.1.5

Then run:

flutter pub get

This package builds on Shorebird. Make sure your app is already set up with shorebird init.

Usage #

1. Add a navigator key #

The package needs a navigatorKey so it can show dialogs from anywhere.

final navigatorKey = GlobalKey<NavigatorState>();

2. Initialize and wrap your app #

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

final navigatorKey = GlobalKey<NavigatorState>();

void main() async {
  WidgetsFlutterBinding.ensureInitialized();

  await ShorebirdUpdater.initialize(
    navigatorKey: navigatorKey,
  );

  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      navigatorKey: navigatorKey,
      home: const ShorebirdUpdaterWidget(
        child: HomePage(),
      ),
    );
  }
}

That's it. On launch the package checks for updates and — if one is available — shows dialogs with your app's name and logo automatically.

Customization #

Everything is optional. Pass an UpdaterConfig to override the defaults:

await ShorebirdUpdater.initialize(
  navigatorKey: navigatorKey,
  config: UpdaterConfig(
    // Provide your own logo (otherwise a default icon is used)
    logo: Image.asset('assets/logo.png'),

    // Turn off the automatic check-on-launch if you want to trigger manually
    autoCheckOnLaunch: true,

    // Force the user to update (hides the "Later" button)
    forceUpdate: false,

    // Custom text
    updateMessage: 'A new version is available.',
    downloadingMessage: 'Downloading latest update...',
    restartMessage: 'The app will close to finish updating. Please reopen it.',
    updateButtonText: 'Update',
    laterButtonText: 'Later',
    restartButtonText: 'Restart',
  ),
);

How updates are applied #

Shorebird applies a downloaded patch only on a cold start (a fresh app launch). When the user taps Restart, this package fully closes the app so that reopening it boots the new patch — a warm relaunch is unreliable and can boot before the patch is committed.

  • Android → the app process is terminated; the user reopens the app.
  • iOS → the app is sent to the background; the update applies on next launch.

Only Dart code changes can be delivered as a patch. Native code, pubspec dependencies, and asset changes require a new shorebird release.

Manual control #

You can also drive the flow yourself instead of (or in addition to) the automatic check:

// Trigger the full check → download → restart flow with UI
await ShorebirdUpdater.checkForUpdates();

// Or control each step
await ShorebirdUpdater.downloadUpdate();
await ShorebirdUpdater.restartApp();

// Read the current status
final status = ShorebirdUpdater.status;

Example #

See the example/ directory for a complete, runnable app.

⭐ Show your support #

If this package saves you time, please:

Every like and star genuinely helps this package grow. Thank you! 🙏

☕ Support / Donate #

This package is built and maintained in my free time. If it helps you, a small tip is hugely appreciated and keeps the updates coming:

  • 💜 UPI (India): dubey.kartik03-1@okicici

Even a coffee's worth of support means a lot — thank you! 🙏

Author #

Made with ❤️ by Kartik Dubey

License #

MIT © Kartik Dubey — see LICENSE.

1
likes
160
points
166
downloads

Documentation

API reference

Publisher

verified publisherkiyotechnologies.in

Weekly Downloads

Flutter package to integrate Shorebird Code Push updates with customizable UI.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

connectivity_plus, flutter, package_info_plus, shorebird_code_push

More

Packages that depend on shorebird_updater