getAttachment function

Future<File> getAttachment(
  1. PapercupsAttachment attachment
)

Implementation

Future<File> getAttachment(PapercupsAttachment attachment) async {
  String dir = (await getApplicationDocumentsDirectory()).path;
  File? file = File(dir +
      Platform.pathSeparator +
      (attachment.id ?? "noId") +
      (attachment.fileName ?? "noName"));
  return file;
}