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
It's tedious to manually construct Map instances for JSON serialization from primitive types. Would be great to have some syntax sugar like this
void callApi({ String? a, String? b, String? c, }) { final params = <String, dynamic>{ 'a': a, 'b': b, 'c': c, }; print(params); } void callApi_proposal({ String? a, String? b, String? c, }) { print($optionals); // $optionals is all optional parameters as a Map<String, dynamic> }
The text was updated successfully, but these errors were encountered:
my suggestion:
void call({String? a, String? b, Map<String, Object?> **params}) { print({'a': a, 'b': b, ...params}); }
also same for positional:
void call(String value, [List<String> *params]);
Sorry, something went wrong.
No branches or pull requests
It's tedious to manually construct Map instances for JSON serialization from primitive types. Would be great to have some syntax sugar like this
The text was updated successfully, but these errors were encountered: