fullRefreshGeneratorDetails function

Future<void> fullRefreshGeneratorDetails(
  1. BuildContext context,
  2. int deviceId, {
  3. required bool awaitDeviceListRefresh,
})

Implementation

Future<void> fullRefreshGeneratorDetails(
  BuildContext context,
  int deviceId, {
  required bool awaitDeviceListRefresh,
}) async {
  // Wait a few seconds for the command to have an effect
  await Future.delayed(kFullRefreshDelay);
  if (!context.mounted) return;

  final refreshGeneratorDetails =
      context.read(fullRefreshGeneratorDetailsProvider);
  await refreshGeneratorDetails(
    context,
    deviceId,
    awaitDeviceListRefresh: awaitDeviceListRefresh,
  );
}