HeadlessBrowserResult class

Result of a headless browser operation

Constructors

HeadlessBrowserResult.new({required bool success, String? html, Map<String, dynamic>? data, Uint8List? screenshot, String? errorMessage, int? statusCode, int? elapsedMillis})
Creates a new HeadlessBrowserResult instance
const
HeadlessBrowserResult.failure({String? errorMessage, int? statusCode, int? elapsedMillis})
Creates a failed result
factory
HeadlessBrowserResult.success({String? html, Map<String, dynamic>? data, Uint8List? screenshot, int? statusCode, int? elapsedMillis})
Creates a successful result
factory

Properties

data Map<String, dynamic>?
Extracted data from the page
final
elapsedMillis int?
Time taken to complete the operation in milliseconds
final
errorMessage String?
Error message if the operation failed
final
hashCode int
The hash code for this object.
no setterinherited
html String?
HTML content of the page
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
screenshot Uint8List?
Screenshot of the page
final
statusCode int?
HTTP status code of the response
final
success bool
Whether the operation was successful
final

Methods

copyWith({bool? success, String? html, Map<String, dynamic>? data, Uint8List? screenshot, String? errorMessage, int? statusCode, int? elapsedMillis}) HeadlessBrowserResult
Creates a copy of this result with the given fields replaced
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

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