Closed payam-zahedi closed 3 years ago
HI,
One way to implement this is to omit required
from nullable arguments in constructors.
What's your opinion ?
@SaeedMasoumi
The generated file will be like from
const factory State.success({
required A a,
required B? b,
}) = StateSuccess;
to
const factory State.success({
required A a,
B? b,
}) = StateSuccess;
? It makes sense to be like the second form
const factory State.success({ required A a, B? b, }) = StateSuccess;
Yes, that make sense and has better experience.
Does the package also support Optional positional parameters? Something like this?
void success(bool status, [ String? value]);
So, I'll change implementation ASAP 😊
Does the package also support Optional positional parameters? Something like this?
void success(bool status, [ String? value]);
No, All of parameters are named ... Is this feature needed ?
It's not something I need, but others may need it.
Hi, I've published version 1.9.0 which addresses your issue ...
That's awesome @FatulM, we can close this issue now.
After working with this package for a while, I have noticed that the package doesn't support for optional parameters. I think users will have a better experience if they do not have to submit optional parameters.