Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Flutter v3.24.5 #103

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

tddang-linagora
Copy link
Contributor

No description provided.

@tddang-linagora tddang-linagora self-assigned this Jan 9, 2025
@hoangdat
Copy link
Member

hoangdat commented Jan 9, 2025 via email

@tddang-linagora
Copy link
Contributor Author

Because it wasn't needed

@tddang-linagora
Copy link
Contributor Author

Actually it is needed.

Comment on lines -31 to +49
'total': const UnsignedIntNullableConverter().toJson(instance.total),
'limit': const UnsignedIntNullableConverter().toJson(instance.limit),
'total': _$JsonConverterToJson<int, UnsignedInt>(
instance.total, const UnsignedIntConverter().toJson),
'limit': _$JsonConverterToJson<int, UnsignedInt>(
instance.limit, const UnsignedIntConverter().toJson),
};

Value? _$JsonConverterFromJson<Json, Value>(
Object? json,
Value? Function(Json json) fromJson,
) =>
json == null ? null : fromJson(json as Json);

Json? _$JsonConverterToJson<Json, Value>(
Value? value,
Json? Function(Value value) toJson,
) =>
value == null ? null : toJson(value);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we have to write an additional function to check for nullability, even though there is a separate converter for nullable?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code in *.g.dart is automatically generated by build_runner

Comment on lines -30 to +47
'total': const UnsignedIntNullableConverter().toJson(instance.total),
'limit': const UnsignedIntNullableConverter().toJson(instance.limit),
'total': _$JsonConverterToJson<int, UnsignedInt>(
instance.total, const UnsignedIntConverter().toJson),
'limit': _$JsonConverterToJson<int, UnsignedInt>(
instance.limit, const UnsignedIntConverter().toJson),
};

Value? _$JsonConverterFromJson<Json, Value>(
Object? json,
Value? Function(Json json) fromJson,
) =>
json == null ? null : fromJson(json as Json);

Json? _$JsonConverterToJson<Json, Value>(
Value? value,
Json? Function(Value value) toJson,
) =>
value == null ? null : toJson(value);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we have to write an additional function to check for nullability, even though there is a separate converter for nullable?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants