Hot Restartless Code Push with Shorebird in Flutter
Jun 23, 2025



Summary
Summary
Summary
Summary
This tutorial explores Shorebird’s restartless code push for Flutter apps, detailing setup, dynamic plugin use, and CI/CD automation. Shorebird leverages the Dart VM to apply patches in real time, allowing developers to ship updates instantly without disrupting users. Best practices and troubleshooting tips help maintain robust deployments.
This tutorial explores Shorebird’s restartless code push for Flutter apps, detailing setup, dynamic plugin use, and CI/CD automation. Shorebird leverages the Dart VM to apply patches in real time, allowing developers to ship updates instantly without disrupting users. Best practices and troubleshooting tips help maintain robust deployments.
This tutorial explores Shorebird’s restartless code push for Flutter apps, detailing setup, dynamic plugin use, and CI/CD automation. Shorebird leverages the Dart VM to apply patches in real time, allowing developers to ship updates instantly without disrupting users. Best practices and troubleshooting tips help maintain robust deployments.
This tutorial explores Shorebird’s restartless code push for Flutter apps, detailing setup, dynamic plugin use, and CI/CD automation. Shorebird leverages the Dart VM to apply patches in real time, allowing developers to ship updates instantly without disrupting users. Best practices and troubleshooting tips help maintain robust deployments.
Key insights:
Key insights:
Key insights:
Key insights:
Hot Code Push Enabled: Shorebird uses Dart VM diffs to update Flutter apps without a restart.
Plugin Architecture: Features can be modularized and dynamically loaded as patchable plugins.
CI/CD Integration: Automating updates via GitHub Actions enables fast, reliable releases.
User-Centric Updates: Code pushes apply on resume, preserving app state and session flow.
Monitoring & Logging: Shorebird Dashboard and runtime callbacks aid in patch visibility and debugging.
Safe Evolution: Maintain backward compatibility or increment app versions for breaking changes.
Introduction
Shorebird enables true hot restartless code push for Flutter, letting you deliver updates without interrupting user sessions. Unlike traditional Flutter code push approaches that rely on full app restarts or OS-level dynamic delivery, Shorebird integrates at the Dart VM level to apply Dart source and asset diffs in real time. This tutorial dives into advanced techniques for configuring, deploying, and automating restartless over-the-air (OTA) updates using Shorebird.
Setting Up Shorebird for Hot Code Push
Before you begin, ensure you have Shorebird CLI v0.2.0 or later, a Flutter 3.7+ project, and a valid Shorebird app ID.
Install Shorebird CLI:
brew tap shorebird-dev/shorebird
brew install shorebird
Authenticate and link your project:
shorebird login
cd path/to/flutter_app
shorebird init
Enable hot restartless code push by configuring your
pubspec.yaml
:
shorebird:
app_id: your_app_id_here
enable_hot_restartless: true
Add the Shorebird runtime plugin in
main.dart
:
import 'package:flutter/material.dart';
import 'package:shorebird_runtime/shorebird_runtime.dart';
void main() async {
await ShorebirdRuntime.ensureInitialized();
runApp(MyApp());
}
With this setup, your app can now fetch and apply patches at startup and during runtime without a full restart.
Implementing Restartless Plugins
Shorebird’s restartless code push mechanism leverages Dart’s isolate model. You can isolate feature modules or hot-swap logic on the fly.
Create a plugin-like structure:
// lib/plugins/feature_x.dart
import 'package:flutter/material.dart';
class FeatureX {
static Widget build() => Text('Feature X v1.0');
}
Reference and load dynamically:
// lib/main.dart
import 'package:shorebird_runtime/shorebird_runtime.dart';
import 'plugins/feature_x.dart' as fx;
void showFeature(BuildContext context) async {
final updated = await ShorebirdRuntime.tryApplyPatch('feature_x');
if (updated) {
// reload plugin isolate
fx.FeatureX.build();
}
}
When you prepare a new release, modify
lib/plugins/feature_x.dart
and create a new Shorebird patch:
shorebird release create \
--patch-version 1.1.0 \
--artifact lib/plugins/feature_x.dart
shorebird release upload --artifact-path
Shorebird will generate a binary diff that clients download on resume, applying the update without restarting app state.
Automating Code Push with CI/CD
Integrate Flutter code push into your pipeline for zero-touch deployments:
In your GitHub Actions workflow:
name: Code Push
on: [push]
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
- run: flutter pub get
- run: shorebird auth --api-key ${{ secrets.SHOREBIRD_API_KEY }}
- run: |
shorebird release create \
--patch-version ${{ github.sha }} \
--artifact lib/
- run
Secure your CI with environment variables for
SHOREBIRD_API_KEY
andAPP_ID
.Validate with smoke tests and metadata tagging so shards of your user base receive staggered rollouts.
Automated pipelines make code push for Flutter frictionless and error-resilient.
Best Practices and Troubleshooting
Modularize features: split heavy logic into distinct Dart libraries. Smaller diffs reduce download time.
Monitor patch success rates through Shorebird Dashboard. Track failures to revert broken patches.
Use
ShorebirdRuntime.onPatchApplied
callbacks to gracefully handle edge cases when hot code push cannot apply (e.g., unsupported asset types).When debugging, enable detailed logs with:
shorebird runtime --verbose
Maintain backward compatibility: avoid removing fields or method signatures. For breaking changes, bump the app version and schedule a full store release.
Vibe Studio

Vibe Studio, powered by Steve’s advanced AI agents, is a revolutionary no-code, conversational platform that empowers users to quickly and efficiently create full-stack Flutter applications integrated seamlessly with Firebase backend services. Ideal for solo founders, startups, and agile engineering teams, Vibe Studio allows users to visually manage and deploy Flutter apps, greatly accelerating the development process. The intuitive conversational interface simplifies complex development tasks, making app creation accessible even for non-coders.
Conclusion
Hot restartless code push with Shorebird revolutionizes how Flutter developers deliver bug fixes and incremental features. By integrating the Shorebird runtime, organizing your code into dynamic modules, and automating deployment pipelines, you achieve near-instant OTA updates that respect active user sessions. Embrace this workflow to accelerate your release cadence and respond rapidly to user feedback, all without forcing app restarts or full downloads.
Introduction
Shorebird enables true hot restartless code push for Flutter, letting you deliver updates without interrupting user sessions. Unlike traditional Flutter code push approaches that rely on full app restarts or OS-level dynamic delivery, Shorebird integrates at the Dart VM level to apply Dart source and asset diffs in real time. This tutorial dives into advanced techniques for configuring, deploying, and automating restartless over-the-air (OTA) updates using Shorebird.
Setting Up Shorebird for Hot Code Push
Before you begin, ensure you have Shorebird CLI v0.2.0 or later, a Flutter 3.7+ project, and a valid Shorebird app ID.
Install Shorebird CLI:
brew tap shorebird-dev/shorebird
brew install shorebird
Authenticate and link your project:
shorebird login
cd path/to/flutter_app
shorebird init
Enable hot restartless code push by configuring your
pubspec.yaml
:
shorebird:
app_id: your_app_id_here
enable_hot_restartless: true
Add the Shorebird runtime plugin in
main.dart
:
import 'package:flutter/material.dart';
import 'package:shorebird_runtime/shorebird_runtime.dart';
void main() async {
await ShorebirdRuntime.ensureInitialized();
runApp(MyApp());
}
With this setup, your app can now fetch and apply patches at startup and during runtime without a full restart.
Implementing Restartless Plugins
Shorebird’s restartless code push mechanism leverages Dart’s isolate model. You can isolate feature modules or hot-swap logic on the fly.
Create a plugin-like structure:
// lib/plugins/feature_x.dart
import 'package:flutter/material.dart';
class FeatureX {
static Widget build() => Text('Feature X v1.0');
}
Reference and load dynamically:
// lib/main.dart
import 'package:shorebird_runtime/shorebird_runtime.dart';
import 'plugins/feature_x.dart' as fx;
void showFeature(BuildContext context) async {
final updated = await ShorebirdRuntime.tryApplyPatch('feature_x');
if (updated) {
// reload plugin isolate
fx.FeatureX.build();
}
}
When you prepare a new release, modify
lib/plugins/feature_x.dart
and create a new Shorebird patch:
shorebird release create \
--patch-version 1.1.0 \
--artifact lib/plugins/feature_x.dart
shorebird release upload --artifact-path
Shorebird will generate a binary diff that clients download on resume, applying the update without restarting app state.
Automating Code Push with CI/CD
Integrate Flutter code push into your pipeline for zero-touch deployments:
In your GitHub Actions workflow:
name: Code Push
on: [push]
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
- run: flutter pub get
- run: shorebird auth --api-key ${{ secrets.SHOREBIRD_API_KEY }}
- run: |
shorebird release create \
--patch-version ${{ github.sha }} \
--artifact lib/
- run
Secure your CI with environment variables for
SHOREBIRD_API_KEY
andAPP_ID
.Validate with smoke tests and metadata tagging so shards of your user base receive staggered rollouts.
Automated pipelines make code push for Flutter frictionless and error-resilient.
Best Practices and Troubleshooting
Modularize features: split heavy logic into distinct Dart libraries. Smaller diffs reduce download time.
Monitor patch success rates through Shorebird Dashboard. Track failures to revert broken patches.
Use
ShorebirdRuntime.onPatchApplied
callbacks to gracefully handle edge cases when hot code push cannot apply (e.g., unsupported asset types).When debugging, enable detailed logs with:
shorebird runtime --verbose
Maintain backward compatibility: avoid removing fields or method signatures. For breaking changes, bump the app version and schedule a full store release.
Vibe Studio

Vibe Studio, powered by Steve’s advanced AI agents, is a revolutionary no-code, conversational platform that empowers users to quickly and efficiently create full-stack Flutter applications integrated seamlessly with Firebase backend services. Ideal for solo founders, startups, and agile engineering teams, Vibe Studio allows users to visually manage and deploy Flutter apps, greatly accelerating the development process. The intuitive conversational interface simplifies complex development tasks, making app creation accessible even for non-coders.
Conclusion
Hot restartless code push with Shorebird revolutionizes how Flutter developers deliver bug fixes and incremental features. By integrating the Shorebird runtime, organizing your code into dynamic modules, and automating deployment pipelines, you achieve near-instant OTA updates that respect active user sessions. Embrace this workflow to accelerate your release cadence and respond rapidly to user feedback, all without forcing app restarts or full downloads.
Ship updates without disruption
Ship updates without disruption
Ship updates without disruption
Ship updates without disruption
Vibe Studio’s conversational interface works seamlessly with Shorebird’s hot code push—speeding up fixes and feature delivery.
Vibe Studio’s conversational interface works seamlessly with Shorebird’s hot code push—speeding up fixes and feature delivery.
Vibe Studio’s conversational interface works seamlessly with Shorebird’s hot code push—speeding up fixes and feature delivery.
Vibe Studio’s conversational interface works seamlessly with Shorebird’s hot code push—speeding up fixes and feature delivery.
Join a growing community of builders today
Join a growing
community
of builders today
Join a growing
community
of builders today










© Steve • All Rights Reserved 2025


© Steve • All Rights Reserved 2025


© Steve • All Rights Reserved 2025


© Steve • All Rights Reserved 2025