ServerResult class
Holds the outcome of a single FCM send request.
Check successful first; if false, inspect fcmError for a typed error
or errorBody for the raw response body.
Constructors
- ServerResult({required bool successful, required int statusCode, FirebaseMessage? messageSent, String? errorPhrase, String? errorBody, FcmError? fcmError})
-
const
Properties
- errorBody → String?
-
The raw response body on failure, for advanced debugging.
final
- errorPhrase → String?
-
The HTTP reason phrase (e.g.,
"Bad Request").final - fcmError → FcmError?
-
Structured FCM error extracted from errorBody, when available.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- messageSent → FirebaseMessage?
-
The FirebaseMessage identifier returned by FCM on success.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- statusCode → int
-
The HTTP status code returned by FCM (200 on success).
final
- successful → bool
-
Whether FCM accepted and will deliver the message.
final
Methods
-
copyWith(
{bool? successful, int? statusCode, FirebaseMessage? messageSent, String? errorPhrase, String? errorBody, FcmError? fcmError}) → ServerResult - Creates a copy with the specified 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 ==(
covariant ServerResult other) → bool -
The equality operator.
override