restartAfterDelay method

Future<void> restartAfterDelay(
  1. int seconds
)

Restart the ChromeOS device when the app runs in kiosk mode after the given seconds. If called again before the time ends, the reboot will be delayed. If called with a value of -1, the reboot will be cancelled. It's a no-op in non-kiosk mode. It's only allowed to be called repeatedly by the first extension to invoke this API. seconds Time to wait in seconds before rebooting the device, or -1 to cancel a scheduled reboot. returns A callback to be invoked when a restart request was successfully rescheduled.

Implementation

Future<void> restartAfterDelay(int seconds) async {
  await promiseToFuture<void>($js.chrome.runtime.restartAfterDelay(seconds));
}