toMap method

Map<String, String> toMap()

Implementation

Map<String, String> toMap() {
  final userId = this.userId;
  final remoteAddress = this.remoteAddress;
  final sessionId = this.sessionId;

  final params = <String, String>{
    if (userId != null) 'userId': userId,
    if (remoteAddress != null) 'remoteAddress': remoteAddress,
    if (sessionId != null) 'sessionId': sessionId,
  };

  properties.forEach((key, value) {
    params['properties[$key]'] = value;
  });

  return params;
}