You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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
The text was updated successfully, but these errors were encountered: