Fatal Exception: FlutterError
Invalid argument(s): DEVICETOKEN is not a valid CallState.
0
twilio_voice_method_channel.dart - Line 430
MethodChannelTwilioVoice.parseCallEvent + 430
1
twilio_voice_method_channel.dart - Line 32
MethodChannelTwilioVoice.callEventsListener.<fn> + 32
Steps to Reproduce
Looking at the source, apparently this implies that the String "DEVICETOKEN" was passed as the parameter to parseCallEvent. parseCallEvent seems to handle a String starting with "DEVICETOKEN|" but does not handle just the String DEVICETOKEN:
@override
CallEvent parseCallEvent(String state) {
if (state.startsWith("DEVICETOKEN|")) {
var token = state.split('|')[1];
if (deviceTokenChanged != null) {
deviceTokenChanged!(token);
}
return CallEvent.log;
} else ....
Maybe a simple fix? But I'm not sure of the root cause or why this would be unexpected. Maybe it means that the device token became null?
Issue Summary
Steps to Reproduce
Looking at the source, apparently this implies that the String
"DEVICETOKEN"
was passed as the parameter toparseCallEvent
.parseCallEvent
seems to handle a String starting with"DEVICETOKEN|"
but does not handle just the StringDEVICETOKEN
:Maybe a simple fix? But I'm not sure of the root cause or why this would be unexpected. Maybe it means that the device token became null?