systemScreen method
Future<String>
systemScreen({
- String imageName = "myimage",
- ImageFormat fileExtension = ImageFormat.jpeg,
- DownloadLocation location = DownloadLocation.temporaryDirectory,
override
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
Implementation
@override
Future<String> systemScreen(
{String imageName = "myimage",
ImageFormat fileExtension = ImageFormat.jpeg,
DownloadLocation location = DownloadLocation.temporaryDirectory}) async {
final String resultvar =
await methodChannel.invokeMethod('SystemWallpaper', {
'location': location.index,
'imageName': imageName,
'fileExtension': _imageFormatToExtension(fileExtension),
});
return resultvar;
}