toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() => <String, Object?>{
      'route': route,
      'title': title,
      if (description != null) 'description': description,
      if (siteUrl != null) 'siteUrl': siteUrl,
      if (image != null) 'image': image,
      if (siteName != null) 'siteName': siteName,
      if (alternates.isNotEmpty) 'alternates': alternates,
      if (defaultAlternate != null) 'defaultAlternate': defaultAlternate,
      if (favicon != null) 'favicon': favicon,
      if (schemaType != null) 'schemaType': schemaType,
      if (robots != null) 'robots': robots,
      if (content != null) 'content': content,
      if (html != null) 'html': html,
      if (text.isNotEmpty) 'text': text,
      if (structuredData != null) 'structuredData': structuredData,
    };