AirBuildCodePushConfig class

Configuration for AirBuildCodePushOverlay.

Constructors

AirBuildCodePushConfig({String channel = 'production', bool checkOnLaunch = true, bool checkOnResume = true, Duration checkInterval = const Duration(hours: 4), bool showDebugBar = false, bool disableOnPlayStoreInstalls = false, VoidCallback? onRestart, CodePushBannerBuilder? bannerBuilder, VoidCallback? onUpdateReady})
Creates overlay configuration. All fields have sensible defaults — const AirBuildCodePushConfig() checks production on launch, on resume, and every 4 hours.
const

Properties

bannerBuilder → CodePushBannerBuilder?
Builds the banner shown when a patch is staged. When null, a default MaterialBanner-style banner with "Later"/"Restart now" actions is used. Return SizedBox.shrink() to disable the banner entirely (e.g. when handling onUpdateReady yourself).
final
channel → String
The AirBuild channel to check ("production", "staging", or any custom channel promoted with airbuild codepush flutter promote --channel <name>). Sent to the server verbatim.
final
checkInterval → Duration
How often to re-check while the app is running. Default 4 hours. Set to Duration.zero to disable periodic checks.
final
checkOnLaunch → bool
Whether to check once when the overlay first builds. Default true.
final
checkOnResume → bool
Whether to check each time the app returns to the foreground. Default true.
final
disableOnPlayStoreInstalls → bool
When true, patch checks and downloads are skipped entirely on devices where the app was installed from the Google Play Store — OTA updates then apply only to AirBuild-distributed/sideloaded installs. Forwarded to the internally created AirBuildCodePush; ignored when a custom codePush instance is passed to the overlay.
final
hashCode → int
The hash code for this object.
no setterinherited
onRestart → VoidCallback?
Called when the user taps "Restart now" on the update banner, and forwarded to bannerBuilder.
final
onUpdateReady → VoidCallback?
Called once per patch when a patch has been downloaded and is waiting for a restart. Runs in addition to the banner — useful for analytics or custom UX.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
showDebugBar → bool
Shows a thin status bar at the top of the screen with the current CodePush state ("Checking for updates…", "Patch ready", …). Intended for internal/dev builds. Default false.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited