MethodChannelPhotosNative class

An implementation of PhotosNativePlatform that uses method channels.

Inheritance

Constructors

MethodChannelPhotosNative()

Properties

allowed bool
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
methodChannel MethodChannel
The method channel used to interact with the native platform.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
version PHVersion
latefinal

Methods

acquireTexture(String id, int width, int height) Future<int>
(Experiment) to acquire photo texture using GPU
override
delete(List<String> ids) Future<int>
Delete photos
override
encode(Uint8List bytes, int width, int height, {required int quality, String? mime}) Future<Uint8List>
Encode(or compress) image data to given format/inputs
override
getBytes(String? id, {String? uri}) Future<Uint8List>
Get photo bytes of the photo
override
getMemo<T>(String key) Future<T?>
Temporarily key-value memo getter usage to share between platform and Flutter
override
getPixels(String id, {String? uri, required int maxSize}) Future<PHImageDescriptor>
Get photo description of the photo
override
getPlatformVersion() Future<String?>
override
getThumbnail(int width, int height, {String? id, String? uri}) Future<PHImageDescriptor>
Get photo thumbnail for an photo item (only one of id/uri is used). Result thumbnail will have size of given width/height parameters
override
getVersion() Future<PHVersion>
Get app version
override
launchUrl(String url) Future<bool>
Launch URL
override
loadGallery({required String title}) Future<PHGallery>
Query all albums from gallery, title is the title of default album (Default album contains all photos in gallery)
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
releaseTexture(String id) Future<void>
(Experiment) to release photo texture using GPU
override
requestPermissions() Future<bool>
Ensure to requests photo library permission before access
override
save(Uint8List bytes, int width, int height, {required int quality, String? album, String? mime}) Future<bool>
Save photo
override
saveFile(Uint8List bytes, int width, int height, {required int quality, String? mime, required String path}) Future<bool>
Save image to file
override
setMemo<T>(String key, T? value) Future<bool>
Temporarily key-value memo setter usage to share between platform and Flutter If value is null, then it will clear memo key
override
share(Uint8List bytes, int width, int height, {String title = ""}) Future<bool>
Share photo, on Android, it will invoke shared Intent, on iOS it will invoke UIActivityViewController
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited