bothScreen method

  1. @override
Future<String> bothScreen({
  1. String imageName = "myimage",
  2. ImageFormat fileExtension = ImageFormat.jpeg,
  3. double width = 0,
  4. double height = 0,
  5. RequestSizeOptions options = RequestSizeOptions.resizeFit,
  6. DownloadLocation location = DownloadLocation.temporaryDirectory,
})
override

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

Implementation

@override
Future<String> bothScreen(
    {String imageName = "myimage",
    ImageFormat fileExtension = ImageFormat.jpeg,
    double width = 0,
    double height = 0,
    RequestSizeOptions options = RequestSizeOptions.resizeFit,
    DownloadLocation location = DownloadLocation.temporaryDirectory}) async {
  final String resultvar = await methodChannel.invokeMethod('Both', {
    'maxWidth': width,
    'maxHeight': height,
    'RequestSizeOptions': options.index,
    'location': location.index,
    'imageName': imageName,
    'fileExtension': _imageFormatToExtension(fileExtension),
  });
  return resultvar;
}