passthroughChip function

Widget passthroughChip({
  1. required BuildContext context,
  2. required String? latestVersion,
  3. required String appVersion,
  4. required UpdatStatus status,
  5. required void checkForUpdate(),
  6. required void openDialog(),
  7. required void startUpdate(),
  8. required Future<void> launchInstaller(),
  9. required void dismissUpdate(),
  10. required dynamic updateChipBuilder({
    1. required String appVersion,
    2. required void checkForUpdate(),
    3. required BuildContext context,
    4. required void dismissUpdate(),
    5. required String? latestVersion,
    6. required Future<void> launchInstaller(),
    7. required void openDialog(),
    8. required void startUpdate(),
    9. required UpdatStatus status,
    })?,
  11. required Function setFunctions,
})

Implementation

Widget passthroughChip({
  required BuildContext context,
  required String? latestVersion,
  required String appVersion,
  required UpdatStatus status,
  required void Function() checkForUpdate,
  required void Function() openDialog,
  required void Function() startUpdate,
  required Future<void> Function() launchInstaller,
  required void Function() dismissUpdate,
  required Function({
    required BuildContext context,
    required String? latestVersion,
    required String appVersion,
    required UpdatStatus status,
    required void Function() checkForUpdate,
    required void Function() openDialog,
    required void Function() startUpdate,
    required Future<void> Function() launchInstaller,
    required void Function() dismissUpdate,
  })?
      updateChipBuilder,
  required Function setFunctions,
}) {
  setFunctions(
    checkForUpdate,
    openDialog,
    startUpdate,
    launchInstaller,
    dismissUpdate,
  );

  return updateChipBuilder?.call(
        context: context,
        latestVersion: latestVersion,
        appVersion: appVersion,
        status: status,
        checkForUpdate: checkForUpdate,
        openDialog: openDialog,
        startUpdate: startUpdate,
        launchInstaller: launchInstaller,
        dismissUpdate: dismissUpdate,
      ) ??
      defaultChip(
        context: context,
        latestVersion: latestVersion,
        appVersion: appVersion,
        status: status,
        checkForUpdate: checkForUpdate,
        openDialog: openDialog,
        startUpdate: startUpdate,
        launchInstaller: launchInstaller,
        dismissUpdate: dismissUpdate,
      );
}