dart_mappable icon indicating copy to clipboard operation
dart_mappable copied to clipboard

readme add plugin describe

Open eitanliu opened this issue 2 years ago • 6 comments

I have developed a plugin called "dart_mappable_plugin" , hope its increasing usability!

eitanliu avatar May 22 '23 05:05 eitanliu

Hi. That sounds really awesome.

I would love to try this out, but I cannot use the plugin with my current version: IntelliJ IDEA Ultimate 2022.3.2 How easy or hard would it be to add support for this version?

schultek avatar May 22 '23 09:05 schultek

The current latest version 1.1.3, maybe provide support, IntelliJ IDEs Plugin Marketplace is reviewing this update, you can download it from GitHub and give it a try.

eitanliu avatar May 23 '23 05:05 eitanliu

I tried it out and it looks really cool.

Couple of notes:

  • There are some mentiones of dart 'bean classes'?
  • Why the ensureInitialized() in the constructor?

schultek avatar May 23 '23 20:05 schultek

  • 'bean classes' are data classes in Java, and the concept has been borrowed from there.
  • I found that when using generics, it is necessary to call ensureInitialized() first. So, I call it in the constructor.

eitanliu avatar May 24 '23 03:05 eitanliu

I wouldn't recommend generating the ensureInitialized in the constructor.

It only needs to be called once in you app and also only is needed when using a mapper implicitly eg. through a generic type. So putting it in the constructor may work in some specific cases, but I don't think this should be the default way classes are generated.

schultek avatar May 29 '23 11:05 schultek

You are right. I have already planned to remove it in an upcoming update.

eitanliu avatar May 29 '23 13:05 eitanliu