Code Push
[](https://discord.gg/shorebird)
[](https://github.com/shorebirdtech/updater/actions/workflows/main.yaml)
[](https://codecov.io/gh/shorebirdtech/updater)
[![License: MIT][license_badge]][license_link]
Instantly push updates to your Flutter app without lengthy app store review cycles.
[Website](https://shorebird.dev?utm_source=pubdev) • [Docs](https://docs.shorebird.dev?utm_source=pubdev) • [X](https://x.com/shorebirddev)• [YouTube](https://www.youtube.com/@shorebird)
This Dart package communicates with the [Shorebird](https://shorebird.dev) Code Push Updater to:
- ✅ Get the currently installed patch version
- ✅ Check whether a new patch is available
- ✅ Download new patches
## Demo
Explore this [interactive demo](https://docs.shorebird.dev/code-push/?utm_source=pubdev) to learn more
## Getting Started
If your Flutter app does not already use Shorebird, follow our
[Getting Started Guide]([https://docs.shorebird.dev/getting-started/?utm_source=pubdev]) to add code push to your
app.
## Installation
```sh
flutter pub add shorebird_code_push
```
## Usage
Shorebird automatically checks for and downloads updates in the background.
Most apps do not need this package. This package is for apps that want
additional control, such as displaying update status to the user or prompting
before downloading.
**Important:** `checkForUpdate()` and `update()` make network calls that may
be slow. Avoid gating app startup on the result (e.g. awaiting in `initState`),
as the app may appear stuck on the splash screen. Use `.then()` instead.
```dart
import 'package:shorebird_code_push/shorebird_code_push.dart';
void main() => runApp(const MyApp());
// [Other code here]
class _MyHomePageState extends State