setFilePath method

void setFilePath({
  1. required String filePath,
  2. required String fileName,
})

Points this wrapper at <cwd>/<filePath>/<fileName>.

filePath is a directory relative to the current working directory (typically web) and fileName is the file inside it (for example index.html or manifest.json).

Implementation

void setFilePath({
  required String filePath,
  required String fileName,
}) {
  try {
    _filePath = path.join(Directory.current.path, filePath, fileName);
    _file = File(_filePath!);
  } catch (e) {
    rethrow;
  }
}