decode method

E decode(
  1. Map<String, dynamic> map
)

Decodes a raw map into an entity via construct.

Implementation

E decode(Map<String, dynamic> map) {
  final build = construct;
  if (build == null) {
    throw StateError('DatumSchema("$name").decode requires a construct: callback — '
        'pass one, or keep using your own fromMap with schema.reader(map).');
  }
  return build(reader(map));
}