toMap method

Map<String, dynamic> toMap()

Implementation

Map<String, dynamic> toMap() {
  if (url != null) {
    // Virtual event
    return {'@type': 'VirtualLocation', 'url': url};
  }
  return {
    '@type': 'Place',
    'name': name,
    if (address != null) 'address': address!.toMap(),
  };
}