We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Is your feature request related to a problem? Please describe. Similer with #437
Describe the solution you'd like
I use key to access my Json after toJson() so I create codes like:
@freezed class TaskDataset with _$TaskDataset { // ↓ here static const keyTask = 'task'; static const keyIsDone = 'isDone'; static const keyCreatedAt = 'createdAt'; static const keyStared = 'stared'; // ↑ here const factory TaskDataset({ required String task, required bool isDone, required DateTime? createdAt, bool? stared, }) = _TaskDataset; factory TaskDataset.fromJson(Map<String, dynamic> json) => _$TaskDatasetFromJson(json); }
I need a way to generate them.
Describe alternatives you've considered As above
Additional context I search and find #437 , but I thing this issue is different.
The text was updated successfully, but these errors were encountered:
That's even worse than #437 :P
JSON logic isn't part of Freezed but json_serializable. Freezed won't do such a thing.
But to begin with, what you're asking is already part of json_serializable, under the name createFieldMap: https://pub.dev/documentation/json_annotation/latest/json_annotation/JsonSerializable/createFieldMap.html
Sorry, something went wrong.
rrousselGit
No branches or pull requests
Is your feature request related to a problem? Please describe.
Similer with #437
Describe the solution you'd like
I use key to access my Json after toJson() so I create codes like:
I need a way to generate them.
Describe alternatives you've considered
As above
Additional context
I search and find #437 , but I thing this issue is different.
The text was updated successfully, but these errors were encountered: