PrerenderConfig class

Configuration for pre-rendering strategies.

Pre-rendering creates static HTML snapshots of your Flutter Web app that search engine crawlers can read.

Constructors

PrerenderConfig({bool enabled = false, String? serviceUrl, List<String> botUserAgents = defaultBotUserAgents, List<String> excludeRoutes = const [], Duration? cacheDuration})
const

Properties

botUserAgents List<String>
User agents that should receive pre-rendered content
final
cacheDuration Duration?
Cache duration for pre-rendered pages
final
enabled bool
Whether pre-rendering is enabled
final
excludeRoutes List<String>
Routes to exclude from pre-rendering
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
serviceUrl String?
The pre-render service URL (e.g., Rendertron instance)
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Constants

defaultBotUserAgents → const List<String>
Default list of known bot user agents