Cast error on iOS 15.4.1
LukasEdl opened this issue · 1 comments
Hi together,
when i try to read the Wackelock.enable
attribute, an cast error is being thrown.
print(await Wakelock.enabled);
results in the error
flutter: 2022-05-30T15:30:39.243665 - [ERROR] type '_InternalLinkedHashMap<Object?, Object?>' is not a subtype of type 'IsEnabledMessage?' in type cast, stacktrace: #0 WakelockApi.isEnabled (package:wakelock_platform_interface/messages.dart:132:34) <asynchronous suspension> #1 MethodChannelWakelock.enabled (package:wakelock_platform_interface/method_channel_wakelock.dart:10:21) <asynchronous suspension> #2 <The path to the message from where it is being called>
It looks like, that the replyMap
in the method ´isEnabled´ in the file ´method_channel_wakelock´ dosent contain the correct value, however if i print the value to console it contains the results entry with the enabled attribute.
I am using the version 0.5.2 of Wakelock.
Do you guys have an idea what the problem is?
Ok, i updated the package to version 0.5.6 and it is working now. I gonna close the issue