OpenGraphEntity class
OpenGraphEntity represents the OpenGraph protocol Properties:
- title: Site title, example: "Open Graph protocol"
- description: Site description, example: "The Open Graph protocol enables any web page to become a rich object in a social graph."
- locale: Site locale, example: "en_US"
- type: Site type, example: "website"
- url: Site url, example: "http://ogp.me/"
- siteName: Site name, example: "Open Graph protocol"
- image: Site image, example: "http://ogp.me/logo.png"
Constructors
-
OpenGraphEntity({required String title, required String description, required String locale, required String type, required String url, required String siteName, required String image, List<
OgImage> images = const [], List<OgVideo> videos = const [], List<OgAudio> audios = const [], Map<String, List< structuredTags = const {}, String? faviconUrl})String> > -
OpenGraphEntity.fromJson(Map<
String, dynamic> json) -
Create OpenGraphEntity from json
factory
Properties
-
audios
→ List<
OgAudio> -
All
og:audioobjects declared by the page, in document order.final - description → String
-
final
- faviconUrl → String?
-
Favicon declared by the page (
<link rel="icon">and friends), resolved to an absolute URL. Null when the page declares none.final - hashCode → int
-
The hash code for this object.
no setterinherited
- image → String
-
final
-
images
→ List<
OgImage> -
All image objects declared by the page, in document order, with their
structured properties (width/height/alt…). When the page declares no
og:imageobjects but an image was found elsewhere, it contains that single image, soimages.firstis always usable when image is.final - locale → String
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- siteName → String
-
final
-
structuredTags
→ Map<
String, List< String> > -
Vertical-specific OpenGraph tags (
article:*,book:*,profile:*,music:*,video:*), keyed by property name. A property may appear several times (e.g.article:tag), hence the list values.final - title → String
-
final
- type → String
-
final
- url → String
-
final
-
videos
→ List<
OgVideo> -
All
og:videoobjects declared by the page, in document order.final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Convert OpenGraphEntity to json
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited