File tree Expand file tree Collapse file tree 1 file changed +5
-11
lines changed
lib/app/utils/permissions Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -6,19 +6,13 @@ import 'package:taskwarrior/app/utils/constants/permissions.dart';
66class PermissionsManager {
77 static Future <void > requestAllPermissions () async {
88 try {
9- final results = await Future .wait (
10- permissions.map ((permission) => _requestPermission (permission)));
11-
12- for (var i = 0 ; i < results.length; i++ ) {
13- final permission = permissions[i];
14- final status = results[i];
15-
9+ for (var permission in permissions) {
10+ final status = await _requestPermission (permission);
11+
1612 if (status) {
17- print (
18- "Permission '${permission .toString ().split ('.' ).last }' granted." );
13+ print ("Permission '${permission .toString ().split ('.' ).last }' granted." );
1914 } else {
20- print (
21- "Permission '${permission .toString ().split ('.' ).last }' denied." );
15+ print ("Permission '${permission .toString ().split ('.' ).last }' denied." );
2216 }
2317 }
2418 } catch (e) {
You can’t perform that action at this time.
0 commit comments