airbuild library

AirBuild Distribution SDK for Flutter.

Usage:

import 'package:airbuild/airbuild.dart';

void main() {
  AirBuild.configure(distributionKey: 'dk_a1b2c3d4e5f6');
  runApp(MyApp());
}

Then, anywhere in your app:

await AirBuild.checkForUpdates(currentVersion: '1.0.0');

Classes

AirBuild
AirBuild Distribution SDK for Flutter.
AirBuildConfig
Configuration for the AirBuild SDK.
UpdateDialog
Default update dialog shown by AirBuild.checkForUpdates.
UpdateInfo
Describes an available update returned by the AirBuild check-update endpoint.

Functions

showUpdateDialog(BuildContext context, {required UpdateInfo update, required OnUpdateCallback onUpdate, OnLaterCallback? onLater, String? appName, bool barrierDismissible = false}) → Future<bool?>
Convenience function that pushes UpdateDialog as a modal route and awaits the result. Returns true if the tester accepted the update, false if they dismissed it, or null if the dialog was closed another way.

Typedefs

OnLaterCallback = void Function()
Signature for the callback invoked when the tester taps "Later".
OnUpdateCallback = Future<void> Function()
Signature for the callback invoked when the tester taps "Update".