Skip to content

Commit dcb4c7d

Browse files
chore: update Flutter bindings
1 parent 968955e commit dcb4c7d

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

crates/yttrium_dart/lib/generated/chain_abstraction/api/prepare.dart

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,21 @@ enum BridgingError {
1717
/// response
1818
class PrepareResponseError {
1919
final BridgingError error;
20+
final String reason;
2021

2122
const PrepareResponseError({
2223
required this.error,
24+
required this.reason,
2325
});
2426

2527
@override
26-
int get hashCode => error.hashCode;
28+
int get hashCode => error.hashCode ^ reason.hashCode;
2729

2830
@override
2931
bool operator ==(Object other) =>
3032
identical(this, other) ||
3133
other is PrepareResponseError &&
3234
runtimeType == other.runtimeType &&
33-
error == other.error;
35+
error == other.error &&
36+
reason == other.reason;
3437
}

crates/yttrium_dart/lib/generated/frb_generated.dart

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -676,10 +676,11 @@ class YttriumDartApiImpl extends YttriumDartApiImplPlatform
676676
PrepareResponseError dco_decode_prepare_response_error(dynamic raw) {
677677
// Codec=Dco (DartCObject based), see doc to use other codecs
678678
final arr = raw as List<dynamic>;
679-
if (arr.length != 1)
680-
throw Exception('unexpected arr length: expect 1 but see ${arr.length}');
679+
if (arr.length != 2)
680+
throw Exception('unexpected arr length: expect 2 but see ${arr.length}');
681681
return PrepareResponseError(
682682
error: dco_decode_bridging_error(arr[0]),
683+
reason: dco_decode_String(arr[1]),
683684
);
684685
}
685686

@@ -1245,7 +1246,8 @@ class YttriumDartApiImpl extends YttriumDartApiImplPlatform
12451246
SseDeserializer deserializer) {
12461247
// Codec=Sse (Serialization based), see doc to use other codecs
12471248
var var_error = sse_decode_bridging_error(deserializer);
1248-
return PrepareResponseError(error: var_error);
1249+
var var_reason = sse_decode_String(deserializer);
1250+
return PrepareResponseError(error: var_error, reason: var_reason);
12491251
}
12501252

12511253
@protected
@@ -1739,6 +1741,7 @@ class YttriumDartApiImpl extends YttriumDartApiImplPlatform
17391741
PrepareResponseError self, SseSerializer serializer) {
17401742
// Codec=Sse (Serialization based), see doc to use other codecs
17411743
sse_encode_bridging_error(self.error, serializer);
1744+
sse_encode_String(self.reason, serializer);
17421745
}
17431746

17441747
@protected

0 commit comments

Comments
 (0)