toMap method Null safety

Map<String, dynamic> toMap()

Implementation

Map<String, dynamic> toMap() => <String, dynamic>{
      if (eventId != null) 'eventId': eventId,
      'eventType': eventType,
      'eventValue': eventValue,
      if (config != null) 'config': config,
      'expiry': expiry,
      if (broadcastOnlineOnly != null)
        'broadcastOnlineOnly': broadcastOnlineOnly,
      if (syncSelfEnable != null) 'syncSelfEnable': syncSelfEnable,
      if (publisherAccount != null) 'publisherAccount': publisherAccount,
      if (publishTime != null) 'publishTime': publishTime,
      if (publisherClientType != null)
        'publisherClientType': publisherClientType,
      if (multiClientConfig != null) 'multiClientConfig': multiClientConfig,
      if (multiClientConfigMap != null)
        'multiClientConfigMap': multiClientConfigMap,
      if (nimConfig != null) 'nimConfig': nimConfig,
    };