Coder Social home page Coder Social logo

Comments (9)

SaeedMasoumi avatar SaeedMasoumi commented on July 2, 2024 1

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

from dart_sealed.

payam-zahedi avatar payam-zahedi commented on July 2, 2024 1
 const factory State.success({
    required A a,
    B? b,
  }) = StateSuccess;

Yes, that make sense and has better experience.

from dart_sealed.

FatulM avatar FatulM commented on July 2, 2024

HI,
One way to implement this is to omit required from nullable arguments in constructors.
What's your opinion ?
@SaeedMasoumi

from dart_sealed.

payam-zahedi avatar payam-zahedi commented on July 2, 2024

Does the package also support Optional positional parameters? Something like this?

 void success(bool status, [ String? value]);

from dart_sealed.

FatulM avatar FatulM commented on July 2, 2024

So, I'll change implementation ASAP
😊

from dart_sealed.

FatulM avatar FatulM commented on July 2, 2024

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 ?

from dart_sealed.

payam-zahedi avatar payam-zahedi commented on July 2, 2024

It's not something I need, but others may need it.

from dart_sealed.

FatulM avatar FatulM commented on July 2, 2024

Hi,
I've published version 1.9.0 which addresses your issue ...

from dart_sealed.

payam-zahedi avatar payam-zahedi commented on July 2, 2024

That's awesome @FatulM, we can close this issue now.

from dart_sealed.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.