xmpp_plugin
xmpp_plugin copied to clipboard
Unhandled Exception: type 'String' is not a subtype of type 'TypingStatus?'
@vavadiyahiren
after updating package when i use
await xmppConnection?.changeTypingStatus(
userInfoModel.jid.toString(), TypingStatusEnum.active.name);
it gives me
(32423): Message messageChat : {customText: , from: [email protected], senderJid: , time: 0, id: UPGVL-7, type: Ack, body: , msgtype:
normal, bubbleType: , mediaURL: , isReadSent: 0, delayTime: 0, chatStateType: }
E/flutter (32423): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: type 'String' is not a subtype of type 'TypingStatus?'
E/flutter (32423): #0 new ChatState.fromJson (package:xmpp_plugin/models/chat_state_model.dart:38)
E/flutter (32423): #1 XmppConnection.start.
this is enum class enum TypingStatusEnum { composing, active, gone, inactive, paused }
@vavadiyahiren it make issue in parsing model in chatstate it have from: eventData['from'] ?? '', senderJid: eventData['senderJid'] ?? '', id: eventData['id'] ?? '', type: eventData['type'] ?? '', msgtype: eventData['msgtype'] ?? '', chatStateType: eventData['chatStateType'] ?? '', but in some cases i receive 10 keys and values these four is parse but remaining make exception