mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-18 06:13:42 +00:00
fix: follow android 11 storage permissions (#66)
This commit is contained in:
1 parent
dda44cc770
commit
21ec1e4539
11 files changed
+55
-90
No files matched your search
@@ -1,7 +1,6 @@
|
||||
import 'package:desktop_drop/desktop_drop.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:permission_handler/permission_handler.dart';
|
||||
import 'package:rounded_loading_button/rounded_loading_button.dart';
|
||||
|
||||
import '../../api/api.dart';
|
||||
@@ -171,13 +170,15 @@ class CreateView extends GetView<CreateController> {
|
||||
try {
|
||||
if (createFormKey.currentState!.validate()) {
|
||||
downloadController.start();
|
||||
if (Util.isAndroid()) {
|
||||
if (!await Permission.storage.request().isGranted) {
|
||||
Get.snackbar('error'.tr,
|
||||
'create.error.noStoragePermission'.tr);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// if (Util.isAndroid()) {
|
||||
// if (!await Permission.storage.request().isGranted) {
|
||||
// Get.snackbar('error'.tr,
|
||||
// 'create.error.noStoragePermission'.tr);
|
||||
// return;
|
||||
// }
|
||||
// }
|
||||
|
||||
await createTask(CreateTask(
|
||||
res: res,
|
||||
opts: Options(
|
||||
|
||||
Reference in new issue
Block a user