writeXapToFile method
Writes the xap bytes to a file at the given path. Returns a File object representing the written file. Throws an IOException if the file cannot be written.
You need check isMvimg before calling this method.
Implementation
File writeXapToFile(String path) {
final file = File(path);
file.writeAsBytesSync(getXapBytes());
return file;
}