async_wallpaper icon indicating copy to clipboard operation
async_wallpaper copied to clipboard

BOTH.SCREENS doesn't works properly

Open pife00 opened this issue 2 years ago • 1 comments

Works very well in download URL, LOCK and HOME , but, if you use BOTH.SCREENS, sometimes works at home or lock but never with two at the same time,

I use a elevate button on press this code;

void _setWallpaper(BuildContext context, String url) async { String result;

// Platform messages may fail, so we use a try/catch PlatformException. try { result = await AsyncWallpaper.setWallpaper( url: "$urlBase${url}_mobile.jpg", wallpaperLocation: AsyncWallpaper.LOCK_SCREEN, goToHome: true, toastDetails: ToastDetails.success(), errorToastDetails: ToastDetails.error(), ) ? 'Wallpaper set' : 'Failed to get wallpaper.'; } catch (e) { // No specified type, handles all print('Something really unknown: $e'); } }

flutter : Flutter 3.10.0 • channel stable Dart: 3.0

Xiaomi Redmi note 11 Android : 12 SKW 1.21 MIUI 13

pife00 avatar May 17 '23 18:05 pife00

This is a problem with some device manufacturers such as Xiaomi, Realme, etc. For this you can use the external apply method setWallpaperFromFileNative or setWallpaperNative to use external app such as Gallery to apply both wallpapers.

codenameakshay avatar May 30 '23 11:05 codenameakshay