Skip to content

Starting on default value work #182

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 2 commits into from
May 25, 2018
Merged

Starting on default value work #182

merged 2 commits into from
May 25, 2018

Conversation

kevmoo
Copy link
Collaborator

@kevmoo kevmoo commented May 25, 2018

I'd like to do a bit more with checking types and supporting enums, but this is a good start

@kevmoo kevmoo requested a review from jakemac53 May 25, 2018 15:50
@@ -44,10 +44,11 @@ class TypeHelperContext implements SerializeContext, DeserializeContext {
(TypeHelper th) => th.deserialize(targetType, expression, this));

String _run(DartType targetType, String expression,
String invoke(TypeHelper instance)) =>
allHelpersImpl(_generator).map(invoke).firstWhere((r) => r != null,
String invoke(TypeHelper instance)) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: go back to =>

'fieldListEmpty': const [42],
'fieldMapEmpty': const {'question': false},
'fieldListSimple': const [4, 5, 6],
'fieldMapSimple': const <Null, Null>{},
Copy link
Collaborator

Choose a reason for hiding this comment

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

<String, int>?

@kevmoo
Copy link
Collaborator Author

kevmoo commented May 25, 2018

@jakemac53 – approved otherwise?

@kevmoo kevmoo force-pushed the i74_default_values branch from 7126bac to 26b5ced Compare May 25, 2018 17:08
@kevmoo kevmoo merged commit 26b5ced into master May 25, 2018
@kevmoo kevmoo deleted the i74_default_values branch May 25, 2018 17:37
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.

2 participants