PFile? loadFromFile(dynamic file, {String? name, int? size}) { if (file is File) { return NativePFile(file); } return null; }