MapperException.incorrectEncoding constructor

MapperException.incorrectEncoding(
  1. Type source,
  2. String expected,
  3. Type actual
)

Exception when getting an unexpected type from an encoder.

Implementation

factory MapperException.incorrectEncoding(
    Type source, String expected, Type actual) {
  return MapperException._('Failed to encode value of type $source to '
      '$expected. Instead encoded to type $actual.');
}