Problem class final
A problem-details envelope (RFC 9457 + data + recoverable).
Constructors
-
Problem({required String type, required String title, required int status, String? detail, String? instance, bool recoverable = false, Map<
String, Object?> data = const <String, Object?>{}}) -
Creates a problem envelope.
const
-
Problem.fromJson(Map<
String, Object?> json) -
Parses a problem envelope from its JSON object form.
factory
Properties
-
data
→ Map<
String, Object?> -
Extension: typed payload (schema published per problem in the catalog).
final
- detail → String?
-
RFC 9457
detail— human-readable explanation specific to this occurrence.final - hashCode → int
-
The hash code for this object.
no setteroverride
- instance → String?
-
RFC 9457
instance— URI identifying the specific occurrence.final - recoverable → bool
-
Extension: whether the frontend may offer a retry (C0 §2/§14).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- status → int
-
RFC 9457
status— the HTTP status code (origin-generated).final - title → String
-
RFC 9457
title— short, human-readable summary.final - type → String
-
RFC 9457
type— a URI identifying the problem type.final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, Object?> - Serializes the envelope to its JSON object form.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override