WallpaperPlatform class abstract

Abstract class that defines the platform interface for managing wallpapers.

Implementations of this class should provide platform-specific methods for setting wallpapers and managing wallpaper-related operations.

Inheritance
  • Object
  • PlatformInterface
  • WallpaperPlatform
Implementers

Constructors

WallpaperPlatform()
Constructs a WallpaperPlatform.

Properties

hashCode int
The hash code for this object.
no setterinherited
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
getPlatformVersion() Future<String?>
Retrieves the platform version.
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
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
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
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
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

instance WallpaperPlatform
The default instance of WallpaperPlatform to use.
getter/setter pair