Skip to content

feature: allow undefined types as long as they have a converter #243

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

Merged
merged 1 commit into from
Jun 21, 2018

Conversation

kevmoo
Copy link
Collaborator

@kevmoo kevmoo commented Jun 20, 2018

Types from Platform-specific libraries (like dart:ui in Flutter)
don't resolve properly during code generation.
See dart-lang/build#733

This update allows undefined types to be handled with custom
to/fromJson for an associated field

Fixes #236

Types from Platform-specific libraries (like dart:ui in Flutter)
don't resolve properly during code generation.
See dart-lang/build#733

This update allows undefined types to be handled with custom
to/fromJson for an associated field

Fixes #236
@JsonSerializable(createFactory: false)
class UnknownFieldTypeToJsonOnly {
// ignore: undefined_class
Bob number;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Note that in Dart 2 this will be a compile time error so migrating this test to use modular kernel will likely be an issue, but you could cross that bridge when you come to it (or possibly exclude this file from that builder).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ack – it was either this or depend on Flutter in the Test 😄

@kevmoo kevmoo merged commit 6befa48 into master Jun 21, 2018
@kevmoo kevmoo deleted the i236_color_sad branch June 21, 2018 20:02
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.

Cannot handle types defined in Flutter dart:ui
2 participants