runDeviceBusyTask<V> method

Future<V> runDeviceBusyTask<V>(
  1. Future<V> task
)

Set the device as busy during the duration of the given async task.

Implementation

Future<V> runDeviceBusyTask<V>(Future<V> task) async {
  try {
    setDeviceBusy(true);
    return await task;
  } finally {
    setDeviceBusy(false);
  }
}