From f589cf8e92c043f6cfee7ab9507f5253404a97c4 Mon Sep 17 00:00:00 2001 From: Orangerot Date: Wed, 8 Jan 2025 12:13:05 +0100 Subject: fix: request external storage for api level >= 33 --- lib/level_selection.dart | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib') diff --git a/lib/level_selection.dart b/lib/level_selection.dart index 08c0f12..33d8c8b 100644 --- a/lib/level_selection.dart +++ b/lib/level_selection.dart @@ -2,6 +2,7 @@ import 'dart:io'; import 'package:file_picker/file_picker.dart'; import 'package:flutter/material.dart'; +import 'package:permission_handler/permission_handler.dart'; import 'package:sense_the_rhythm/esense_connect_dialog.dart'; import 'package:sense_the_rhythm/esense_input.dart'; import 'package:sense_the_rhythm/simfile.dart'; @@ -43,6 +44,7 @@ class _LevelSelectionState extends State { } Future selectFolder() async { + await Permission.manageExternalStorage.request(); String? selectedFolder = await FilePicker.platform.getDirectoryPath(); if (selectedFolder != null) { -- cgit v1.2.3