toMap method

Map<String, dynamic> toMap()

Implementation

Map<String, dynamic> toMap() {
  final Map<String, dynamic> data = <String, dynamic>{};
  if (messages != null) {
    data['groupMessages'] = messages?.value;
  }
  if (replies != null) {
    data['groupReplies'] = replies?.value;
  }
  if (reactions != null) {
    data['groupReactions'] = reactions?.value;
  }
  if (memberLeft != null) {
    data['groupMemberLeft'] = memberLeft?.value;
  }
  if (memberAdded != null) {
    data['groupMemberAdded'] = memberAdded?.value;
  }
  if (memberJoined != null) {
    data['groupMemberJoined'] = memberJoined?.value;
  }
  if (memberKicked != null) {
    data['groupMemberKicked'] = memberKicked?.value;
  }
  if (memberBanned != null) {
    data['groupMemberBanned'] = memberBanned?.value;
  }
  if (memberUnbanned != null) {
    data['groupMemberUnbanned'] = memberUnbanned?.value;
  }
  if (memberScopeChanged != null) {
    data['groupMemberScopeChanged'] = memberScopeChanged?.value;
  }
  return data;
}