feat(mobile): add three-state field serialization (#27231)

* bump to v7.22.0 and update patching

* gen client

* migrate mobile call sites
This commit is contained in:
Timon
2026-06-03 14:13:17 +02:00
committed by GitHub
parent 1bb7517da0
commit 96d521e149
161 changed files with 3531 additions and 3369 deletions
+6 -7
View File
@@ -13,7 +13,7 @@ part of openapi.api;
class StackUpdateDto {
/// Returns a new [StackUpdateDto] instance.
StackUpdateDto({
this.primaryAssetId,
this.primaryAssetId = const Optional.absent(),
});
/// Primary asset ID
@@ -23,7 +23,7 @@ class StackUpdateDto {
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
String? primaryAssetId;
Optional<String?> primaryAssetId;
@override
bool operator ==(Object other) => identical(this, other) || other is StackUpdateDto &&
@@ -39,10 +39,9 @@ class StackUpdateDto {
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.primaryAssetId != null) {
json[r'primaryAssetId'] = this.primaryAssetId;
} else {
// json[r'primaryAssetId'] = null;
if (this.primaryAssetId.isPresent) {
final value = this.primaryAssetId.value;
json[r'primaryAssetId'] = value;
}
return json;
}
@@ -56,7 +55,7 @@ class StackUpdateDto {
final json = value.cast<String, dynamic>();
return StackUpdateDto(
primaryAssetId: mapValueOfType<String>(json, r'primaryAssetId'),
primaryAssetId: json.containsKey(r'primaryAssetId') ? Optional.present(mapValueOfType<String>(json, r'primaryAssetId')) : const Optional.absent(),
);
}
return null;