fromJson static method

Embeddable fromJson(
  1. Map<String, dynamic> json
)

Implementation

static Embeddable fromJson(Map<String, dynamic> json) {
  final m = Map<String, dynamic>.from(json);
  assert(m.length == 1, 'Embeddable map must only have one key');

  return Embeddable(m.keys.first, m.values.first);
}