coderForField abstract method

String? coderForField(
  1. FieldElement field,
  2. SharedChecker<Model> checker, {
  3. required FieldAnnotation fieldAnnotation,
  4. required bool wrappedInFuture,
})

Produces serializing or deserializing method given a field and checker.

The assignment (data['my_field']: in serializers or myField: in deserializers) is automatically injected by the superclass and should not be included in the output of the coder.

To simplify checking, Futures are unwrapped before they get to this method. If the type was originally a future, wrappedInFuture is true. For example, Future<List<int>> will be an iterable according to the checker and wrappedInFuture will be true.

Implementation

String? coderForField(
  FieldElement field,
  SharedChecker checker, {
  required FieldAnnotation fieldAnnotation,
  required bool wrappedInFuture,
});