getFilePath static method

Future<String> getFilePath(
  1. String fileName
)

This method returns the file path with the given fileName in the application documents directory.

Implementation

static Future<String> getFilePath(String fileName) async {
  final Directory appDocumentsDir = await getApplicationDocumentsDirectory();
  String appDocumentsPath = appDocumentsDir.path;
  String filePath = path.join(appDocumentsPath, fileName);
  return filePath;
}