AppUpdateManager class

Main class for managing app updates with Firebase Firestore integration.

This class provides a complete solution for in-app update management, including version checking, dialog display, and store URL launching.

Features:

  • Automatic version comparison with Firestore
  • Default dialog style with blur background
  • Force update handling
  • Platform-specific store URL generation
  • Auto setup for first-time configuration

Example:

AppUpdateManager(
  context: context,
  appName: "MyApp",
).checkForUpdate();

Constructors

AppUpdateManager({required BuildContext context, String? appName, bool? showLaterButton, FirebaseFirestore? firestore, bool autoSetup = false, CustomUpdateDialog? customDialog, DefaultDialogColors? dialogColors})
Creates an AppUpdateManager instance.

Properties

appName String?
App name to display in update dialogs.
final
autoSetup bool
Auto setup flag for creating Firestore structure.
final
context BuildContext
The build context used for showing dialogs and detecting platform.
final
customDialog CustomUpdateDialog?
Custom dialog implementation.
final
dialogColors DefaultDialogColors?
Custom colors for the default dialog.
final
firestore → FirebaseFirestore
Firebase Firestore instance for version management.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showLaterButton bool?
Whether to show the "Later" button for optional updates.
final

Methods

checkForUpdate() Future<void>
Checks for available updates by comparing current app version with Firestore.
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