75d10b2585
* chore: add homepage to pubspec.yaml * update pubspec
Shorebird Code Push
A Dart library that allows Flutter apps to get information about code push updates.
Usage
import 'package:shorebird_code_push/shorebird_code_push.dart';
final shorebirdCodePush = ShorebirdCodePush();
// Gets the current patch version, or null if no patch is installed.
final currentPatchversion = shorebirdCodePush.currentPatchVersion();
// Checks whether a patch is available to install.
final isUpdateAvailable = await shorebirdCodePush.checkForUpdate();
Developing
FFI
The Dart code in this library communicates with the Updater (part of Shorebird's Flutter engine) via FFI.
For an Updater function to be visible to the Dart code, it must:
- Be declared in c_api.rs as
pub extern "C".- This will add the function to the
library/include/updater.hheader file, which is generated by cbindgen when the Updater is built.
- This will add the function to the
- Be included in the generated ffi bindings. These can be regenerated using
dart run ffigen. - Android specific: be listed in https://github.com/shorebirdtech/engine/blob/main/shell/platform/android/android_exports.lst