schultek / dart_mappable

Improved json serialization and data classes with full support for generics, inheritance, customization and more.
https://pub.dev/packages/dart_mappable
MIT License
165 stars 23 forks source link

how to generate lerp function #243

Closed yousefak007 closed 5 days ago

yousefak007 commented 6 days ago

i want to extend ThemeExtension and should implement copyWith and lerp methods

how I can achieve this?

schultek commented 6 days ago

Just add the function to your class? There is no magic. Or I don't understand the question.

yousefak007 commented 6 days ago

Just add the function to your class? There is no magic. Or I don't understand the question.

lol

Yes it's easy but it's also boilerplate work, so if the generator adds this ability we can have copyWith, lerp and hashcode all of them are generated

schultek commented 5 days ago

This is really not in the scope of this package.

You can ofc. write your own code generator.