PrerenderOptions class

Annotation to configure prerendering for a component.

Use this to customize how a component is prerendered.

Example:

@Component(
  selector: 'blog-post',
  template: '...',
)
@PrerenderOptions(
  waitForSelector: '[data-content-loaded]',
  timeout: 10000,
)
class BlogPostComponent {}

Constructors

PrerenderOptions({String? waitForSelector, int timeout = 5000, bool waitForNetworkIdle = true, Map<String, dynamic>? data})
const

Properties

data Map<String, dynamic>?
Custom data to pass to the prerenderer.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
timeout int
Timeout in milliseconds for rendering.
final
waitForNetworkIdle bool
Whether to wait for network idle before capturing.
final
waitForSelector String?
CSS selector to wait for before capturing the page.
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