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
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!
The text was updated successfully, but these errors were encountered:
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!
The text was updated successfully, but these errors were encountered: