SdkResponse class
Represents the normalized result returned by the SDK request APIs.
Constructors
-
SdkResponse.new({required bool ok, required ResponseSource source, int? statusCode, String? message, dynamic data, SdkError? error, Map<
String, dynamic> meta = const {}}) -
Creates a normalized SDK response.
const
Properties
- data → dynamic
-
Normalized response payload.
final
- error → SdkError?
-
Error details for unsuccessful responses.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- message → String?
-
User-facing message extracted from the response contract when available.
final
-
meta
→ Map<
String, dynamic> -
Extra metadata attached by SDK features.
final
- ok → bool
-
Whether the operation was successful according to HTTP and contract rules.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- source → ResponseSource
-
Where the result came from.
final
- statusCode → int?
-
HTTP status code when one was available.
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