How to ask a user of the application a custom permission?

Flutter fow give us an action that do that but we want a custom permission ( in this case the file storage ) i am tryng to use this code:// Automatic FlutterFlow imports

import '/backend/backend.dart';
import '/backend/schema/structs/index.dart';
import '/flutter_flow/flutter_flow_theme.dart';
import '/flutter_flow/flutter_flow_util.dart';
import '/custom_code/actions/index.dart'; // Imports other custom actions
import '/flutter_flow/custom_functions.dart'; // Imports custom functions
import 'package:flutter/material.dart';
// Begin custom action code
// DO NOT REMOVE OR MODIFY THE CODE ABOVE!

import 'dart:io';
import 'package:path_provider/path_provider.dart';
import 'package:permission_handler/permission_handler.dart';

Future<bool> permessi() async {
  Permission permissionHandler = Permission.manageExternalStorage;
  var permissionStatus = await permissionHandler.request();
  if (permissionStatus == PermissionStatus.denied) {
    return false;
  } else {
    return true;
  }
}
8
1 reply