-
Notifications
You must be signed in to change notification settings - Fork 408
New issue
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
Arguments are missing in constructor of TypeAdapter from extended class #236
Comments
Unfortunately, only zero-argument constructors and constructors which use Initializing parameters (like "Pet(this.name, this.age)") can be used. |
I just stumbled into this. |
my problem is that I am using any help is appreciated. |
is there any way to fix the constructor issue ? |
If you don't specify a constructor, then there's an implicit default constructor. Can you paste your class? |
|
Duplicate of #442 |
@simc I'm struggling to figure out how to migrate old data into a new object format. You say only Moreover, it looks like certain fields that should be |
Steps to Reproduce
I have created TypeAdapter from this comment to use extended class.
Code sample
pet.dart
dog.dart
dog.g.dart
How you can see, there is an error in the constructor of Dog in TypeAdapter, arguments are missing.
Version
The text was updated successfully, but these errors were encountered: