MethodChannelWallpaper class

An implementation of WallpaperPlatform that uses method channels.

Inheritance

Constructors

MethodChannelWallpaper()

Properties

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

Methods

bothScreen({String imageName = "myimage", ImageFormat fileExtension = ImageFormat.jpeg, double width = 0, double height = 0, RequestSizeOptions options = RequestSizeOptions.resizeFit, DownloadLocation location = DownloadLocation.temporaryDirectory}) Future<String>
systemScreen gives you the option to use default wallpaper system which allows you to set home, lock screen or both location where the image is downloaded Requires Read and Write Storage Permissions
override
getPlatformVersion() Future<String?>
Retrieves the platform version.
override
homeScreen({String imageName = "myimage", ImageFormat fileExtension = ImageFormat.jpeg, double width = 0, double height = 0, RequestSizeOptions options = RequestSizeOptions.resizeFit, DownloadLocation location = DownloadLocation.temporaryDirectory}) Future<String>
homeScreen is to set home screen imageName -> Name of the downloaded image to set as home screen width and height -> send the width and height to use while setting the image as wallpaper else will use the entire image as it is options to use when setting wallpaper RESIZE_FIT, RESIZE_INSIDE, RESIZE_EXACT,RESIZE_CENTRE_CROP location where the image is downloaded
override
imageDownloadProgress(String url, {String imageName = 'myimage', ImageFormat fileExtension = ImageFormat.jpeg, DownloadLocation location = DownloadLocation.temporaryDirectory}) Stream<String>
before using homeScreen, lockScreen , bothScreen, systemScreen . we need to download image . imageName -> after downloading image name to be saved so when using home screen, etc we can pass this name and location location where the image is downloaded
override
lockScreen({String imageName = "myimage", ImageFormat fileExtension = ImageFormat.jpeg, double width = 0, double height = 0, RequestSizeOptions options = RequestSizeOptions.resizeFit, DownloadLocation location = DownloadLocation.temporaryDirectory}) Future<String>
bothScreenis to set home and lock screen imageName -> Name of the downloaded image to set as home screen width and height -> send the width and height to use while setting the image as wallpaper else will use the entire image as it is options to use when setting wallpaper RESIZE_FIT, RESIZE_INSIDE, RESIZE_EXACT,RESIZE_CENTRE_CROP location where the image is downloaded
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
systemScreen({String imageName = "myimage", ImageFormat fileExtension = ImageFormat.jpeg, DownloadLocation location = DownloadLocation.temporaryDirectory}) Future<String>
before using homeScreen, lockScreen , bothScreen, systemScreen . we need to download image . imageName -> after downloading image name to be saved so when using home screen, etc we can pass this name and location location where the image is downloaded
override
toString() String
A string representation of this object.
inherited

Operators

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