requestPermissions method

Future<void> requestPermissions()

Request all required permissions to access the existing backup files stored on the Media locations.

Implementation

Future<void> requestPermissions() async {
  var statusStorage = await Permission.storage.status;

  var statusManageStorage = await Permission.manageExternalStorage.status;

  if (!statusStorage.isGranted) await Permission.storage.request();

  if (!statusManageStorage.isGranted)
    await Permission.manageExternalStorage.request();
}