wallpaper_manager
wallpaper_manager copied to clipboard
How to fully cover the wallpaper instead of stretching it
Is there any ways to cover the wallpaper responsivly (specially on lockscreen) without stretching or squeezing the image?
Is there any ways to cover the wallpaper responsivly (specially on lockscreen) without stretching or squeezing the image?
You can crop the image using WallpaperManager.setWallpaperFromFileWithCrop
. Provide the left, top, right, and bottom values to match the screen of the device.
Is there any ways to cover the wallpaper responsivly (specially on lockscreen) without stretching or squeezing the image?
You can crop the image using
WallpaperManager.setWallpaperFromFileWithCrop
. Provide the left, top, right, and bottom values to match the screen of the device.
I already used findRenderObject to get the screen left, right, top, bottom, and crop it but it still the same thing!
@X-SLAYER
I used MediaQuery.of(context).size
to get the screen width and height.
Then get the screen ratio by double screenRatio = width / height;
. Use that ratio to calculate the width of the final image based on the height of the image. Because your screen size (height and width) won't match up with the image's size, so you need to adjust while maintaining the screen ratio.
@christiankyle-ching
can u provide me ur code snippets cause I tried the same thin but still nothing happend