openLocalFile static method

dynamic openLocalFile(
  1. String path, {
  2. String? type,
})

Implementation

static openLocalFile(String path, {
  String? type
}) async {
  OpenResult result = await OpenFilex.open(path, type: type);
  if (result.type == ResultType.permissionDenied) {
    bool isGranted = await UFUtils.permissionUtils.getStoragePermission();
    if (isGranted) openLocalFile(path);
  } else if(result.type != ResultType.done) {
    UFUToast.showToast(result.message.capitalizeFirst!);
  }
}