Skip to main content

Shorebird Block

Here is a an in depth guide on how to integrate the Shorebird Block into your project. Here

Dependencies

Installation

<manifest ...>
<uses-permission android:name="android.permission.INTERNET"/>
<application ...>
...
</application>
</manifest>

Input Parameters

Doctor

How Does It Work?

Widgets

Cloud Functions

Services

Upgrader

Upgrader is a package that helps you to manage the upgrade process of your application. It provides a simple way to show a dialog to the user to either update the app now or later. It also provides a way to force the user to update the app. This is setup by default in the Initial Brick. If you want to test it in debug mode, you can set the debugDisplayOnce parameter to true in the SplashScreen file. Like this :

class SplashScreen extends StatelessWidget {

...

Widget build(BuildContext context) {
return UpgradeAlert(
showIgnore: false,
dialogStyle: Platform.isIOS
? UpgradeDialogStyle.cupertino
: UpgradeDialogStyle.material,
upgrader: Upgrader(
debugDisplayOnce: false, // Change to true to see the alert in debug mode
durationUntilAlertAgain: const Duration(days: 1),
),
child: ...
)
}
}

The upgrader package can enforce a minimum app version simply by adding a version number to the description field in the app stores.

For the Android Play Store, use this format:

[Minimum supported app version: 1.2.3]

For the iOS App Store, use this format:

[:mav: 1.2.3]

Using that text says that the minimum app version is 1.2.3 and that earlier versions of this app will be forced to update to the current version. The Ignore and Later buttons will automatically be hidden.