SocialImageGenerator class

Dynamic SVG-based social image generator with safe XML escaping and in-memory caching.

Constructors

SocialImageGenerator({int maxCachedImages = 500})

Properties

cachedCount → int
no setter
hashCode → int
The hash code for this object.
no setterinherited
maxCachedImages → int
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

clearCache() → void
Clears in-memory card cache.
generateSvg(SocialCardData data, {SocialCardDimensions dimensions = SocialCardDimensions.openGraph, SocialCardTheme theme = const SocialCardTheme()}) → String
Generates a resolution-independent SVG social image card.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDataUri(String svg) → String
Converts an SVG string into a data URI (data:image/svg+xml;utf8,...) for direct use in <meta property="og:image">.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited