Skip to content

Commit

Permalink
codegen limitation updated for flutter
Browse files Browse the repository at this point in the history
  • Loading branch information
anidotnet committed Apr 30, 2024
1 parent 0b97449 commit c20fb10
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion flutter-sdk/repository/codegen.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ There are certain limitations of each of the generators as described below:
### Converter Generator

- `@Convertable` annotation can only be used on a class and not on an abstract class or mixin.
- `@Convertable` can only be used on a class which has at least one public constructor which is either a default constructor or one with all the parameters named or optional. Examples are given below.
- `@Convertable` can only be used on a class which has at least one public constructor which is either a default constructor or one with all the parameters named or optional.
- A class with a constructor having all positional optional parameters should not have any final field.
- A class with a constructor having all named parameters (optional/required) should have all the fields' names same as the parameter names.
- There are certain limitations on the fields and its data types:
Expand All @@ -226,6 +226,7 @@ There are certain limitations of each of the generators as described below:
- `Symbol` type is not supported.
- `Never` type is not supported.
- `Void` type is not supported.
- Any field with user-defined class type should be nullable.
- `@DocumentKey`, `@IgnoredKey` annotation can only be used on a field or property.
- `@DocumentKey` annotation can not be used on a private/static/synthetic field.
- `@IgnoredKey` annotation can not be used on a field with the same name as a non-null required named parameter in the constructor.
Expand Down

0 comments on commit c20fb10

Please sign in to comment.