MethodChannelWallpaper class
An implementation of WallpaperPlatform that uses method channels.
- Inheritance
-
- Object
- PlatformInterface
- WallpaperPlatform
- MethodChannelWallpaper
Constructors
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 Permissionsoverride -
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 screenwidth
andheight
-> send the width and height to use while setting the image as wallpaper else will use the entire image as it isoptions
to use when setting wallpaperRESIZE_FIT
,RESIZE_INSIDE
,RESIZE_EXACT
,RESIZE_CENTRE_CROP
location
where the image is downloadedoverride -
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 andlocation
location where the image is downloadedoverride -
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 screenwidth
andheight
-> send the width and height to use while setting the image as wallpaper else will use the entire image as it isoptions
to use when setting wallpaperRESIZE_FIT
,RESIZE_INSIDE
,RESIZE_EXACT
,RESIZE_CENTRE_CROP
location
where the image is downloadedoverride -
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 andlocation
location where the image is downloadedoverride -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited