toJson method

Map<String, dynamic> toJson()

Mirrors the native error payload (type, message, uuid).

category is deliberately excluded: it is derived from type rather than transmitted, so emitting it would produce a payload the native decoders reject (Android decodes with ignoreUnknownKeys = false).

Implementation

Map<String, dynamic> toJson() => {
      'uuid': uuid,
      'type': type.toJson(),
      'message': message,
    };