flutter_jpush icon indicating copy to clipboard operation
flutter_jpush copied to clipboard

发送自定义消息的时候,extar 类型是空,会有异常

Open coder-wusichao opened this issue 7 years ago • 0 comments

实例化 JPushMessage 的时候,extar 类型是空,会有异常

case 'receivePushMsg': { var map = call.arguments; var extras = map['extras']; if (extras != null) { try { if (extras is String) { extras = json.decode(extras); } } catch (e) {} } _recvCustomMsgController.add(new JPushMessage( title: map['title'], message: map['message'] ?? map['content'], contentType: map['contentType'] ?? map['content_type'], extras: extras)); } break;

JPushMessage({this.message, this.contentType, this.title, this.extras});

coder-wusichao avatar Sep 18 '18 03:09 coder-wusichao