wallpaper_manager
wallpaper_manager copied to clipboard
Cast Error thrown when applying wallpaper
Platform used: iOS 13.4.1
Error thrown:
Exception has occurred. _CastError (type 'String' is not a subtype of type 'int' in type cast)
Method throwing error:
setWallpaperFromFile()
Cause:
final int result = await _channel.invokeMethod('setWallpaperFromFile',...)
Result variable expects a int value, however, on iOS 13.4.1, the returned value is a String expression giving the current iOS version: "iOS 13.4.1".
I did a quick fix for my project by setting result variable to a simple non final var, however, the great fix might be on the iOS channel side.
Note I know iOS does not allow to set wallpapers from third parties. But it is a great option to catch this error if a developer is using this method on iOS for any reason!
Keep up the good work!
I think this might explains it https://github.com/AdityaMulgundkar/wallpaper_manager#notes 😢