AppVersionCustomDialog constructor

AppVersionCustomDialog({
  1. required String jsonUrl,
  2. required BuildContext context,
  3. required Widget dialogBuilder(
    1. BuildContext
    ),
  4. bool? showWeb,
  5. bool barrierDismissible = true,
})

Checks if it is necessary to show an app update.

This method performs the following operations:

  1. Retrieves the app information.
  2. Checks if the JSON file containing the app information is available.
  3. Verifies if the app package matches any of the known packages (Android, iOS, Windows, Linux, macOS, Web).
  4. Checks if a new version of the app is available.
  5. Displays an update dialog if necessary.

Returns a Future<bool> indicating if the update dialog was shown.

Returns:

  • true if the update dialog was shown.
  • false otherwise.

Implementation

AppVersionCustomDialog({
  required super.jsonUrl,
  required this.context,
  required this.dialogBuilder,
  this.showWeb,
  this.barrierDismissible = true,
});