CxorbiWebViewWrapper class
Wraps a consumer-owned WebView so its content is captured into the mobile session replay. The SDK provides the recorder + bridge name + inbound-message callback; the consumer builds their WebView and wires that one channel.
Records only pages whose host matches allowedHosts (exact, .suffix,
or single * wildcard); an empty list records nothing. Renders the
consumer's child unchanged — it is purely a capture seam.
CxorbiWebViewWrapper(
allowedHosts: const ['shop.example.com'],
builder: (context, b) => InAppWebView(
initialUserScripts: UnmodifiableListView([
UserScript(source: b.injectionScript,
injectionTime: UserScriptInjectionTime.AT_DOCUMENT_START),
]),
onWebViewCreated: (c) {
c.addJavaScriptHandler(
handlerName: b.bridgeName,
callback: (args) { b.onJsMessage(args.first as String); return null; },
);
// Optional: let the SDK apply live recorder policy to this WebView.
b.attachJavaScriptEval((js) => c.evaluateJavascript(source: js));
},
),
)
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- CxorbiWebViewWrapper
Constructors
-
CxorbiWebViewWrapper({Key? key, required Widget builder(BuildContext context, CxorbiWebViewBinding binding), List<
String> allowedHosts = const <String>[], String recorderUrl = kCxorbiRecorderUrl}) -
const
Properties
-
allowedHosts
→ List<
String> -
Hosts whose pages may be recorded (exact /
.suffix/ single*).final - builder → Widget Function(BuildContext context, CxorbiWebViewBinding binding)
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- recorderUrl → String
-
Hosted recorder URL used by the injected script.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< CxorbiWebViewWrapper> -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited