covariant method
Assert that JavaScript's x
is the proper type represented by this
Type.
Implementation
@override
bool covariant(x) {
// Ignoring types other than `Map`.
if (x is! Map) {
return true;
}
return x.entries.length == 1 &&
_fields.every((entry) {
// [k, v]
return !x.containsKey(entry.key) ||
entry.value.covariant(x[entry.key]);
});
}