HostActionRequest class abstract
Standard request envelope sent from the SDK to a host bridge action handler.
The action field is the stable wire name, while payload stays JSON-shaped
so the SDK and host can validate and deserialize it into the appropriate
typed action payload model.
- Available extensions
- Annotations
-
- @freezed
Constructors
-
HostActionRequest({String? requestId, @JsonKey.new(name: 'action') required String actionName, @Default.new(<String, dynamic>{}) Map<
String, dynamic> payload}) -
constfactory
- HostActionRequest.callSecureApi({String? requestId, required CallSecureApiActionPayload payload})
-
factory
-
HostActionRequest.fromJson(Map<
String, dynamic> json) -
factory
- HostActionRequest.openNativeScreen({String? requestId, required OpenNativeScreenActionPayload payload})
-
factory
- HostActionRequest.trackEvent({String? requestId, required TrackEventActionPayload payload})
-
factory
Properties
- actionName → String
-
no setterinherited
-
copyWith
→ $HostActionRequestCopyWith<
HostActionRequest> -
Create a copy of HostActionRequest
with the given fields replaced by the non-null parameter values.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
-
payload
→ Map<
String, dynamic> -
no setterinherited
- requestId → String?
-
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
map<
TResult extends Object?> (TResult $default(_HostActionRequest value)) → TResult -
Available on HostActionRequest, provided by the HostActionRequestPatterns extension
Aswitch-like method, using callbacks. -
mapOrNull<
TResult extends Object?> (TResult? $default(_HostActionRequest value)?) → TResult? -
Available on HostActionRequest, provided by the HostActionRequestPatterns extension
A variant ofmapthat fallback to returningnull. -
maybeMap<
TResult extends Object?> (TResult $default(_HostActionRequest value)?, {required TResult orElse()}) → TResult -
Available on HostActionRequest, provided by the HostActionRequestPatterns extension
A variant ofmapthat fallback to returningorElse. -
maybeWhen<
TResult extends Object?> (TResult $default(String? requestId, String actionName, Map< String, dynamic> payload)?, {required TResult orElse()}) → TResult -
Available on HostActionRequest, provided by the HostActionRequestPatterns extension
A variant ofwhenthat fallback to anorElsecallback. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Serializes this HostActionRequest to a JSON map.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
when<
TResult extends Object?> (TResult $default(String? requestId, String actionName, Map< String, dynamic> payload)) → TResult -
Available on HostActionRequest, provided by the HostActionRequestPatterns extension
Aswitch-like method, using callbacks. -
whenOrNull<
TResult extends Object?> (TResult? $default(String? requestId, String actionName, Map< String, dynamic> payload)?) → TResult? -
Available on HostActionRequest, provided by the HostActionRequestPatterns extension
A variant ofwhenthat fallback to returningnull
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited