toMap method

Map<String, dynamic> toMap()

Implementation

Map<String, dynamic> toMap() {
  // var uri = Uri.http('', name, attrs);
  // var pathWithParams = '${uri.path}?${uri.query}';
  return {
    'sessionUId': session.uid,
    'name': name, // only path
    // 'url': pathWithParams, // with query params
    'type': type.name,
    'attrs': attrs != null ? jsonEncode(attrs) : null,
  };
}