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

Generated Factory does not have the return type and lint cries #12

Closed
danielgomezrico opened this issue Dec 28, 2023 · 1 comment
Closed

Comments

@danielgomezrico
Copy link

danielgomezrico commented Dec 28, 2023

Current

The generated factories do not have the void type on the return and then linter may warn about it

How it currently generates factories:

factory UserContext([Function(UserContextBuilder b) updates]) = _$UserContext;

Linter:
image

It looks to me that this becomes important after dart 2, since the type inference is stronger.

This is related to:

Expected

The generated factory has the void already there

factory UserContext([void Function(UserContextBuilder b) updates]) = _$UserContext;
@charafau
Copy link
Owner

charafau commented Jan 7, 2024

thanks for creating the issue! This project is just a quick hack for creating classes for json, I don't really maintain it.
Given current state of thing, I'll probably deprecate this when macros are available in dart.

@charafau charafau closed this as completed Jan 7, 2024
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

No branches or pull requests

2 participants