contains method
Check if this struct has the key in its own _fields or its prototypes' _fields
Implementation
@override
bool contains(String? id) {
if (id == null) {
return false;
}
if (_fields.containsKey(id)) {
return true;
} else if (prototype != null && prototype!.contains(id)) {
return true;
} else {
return false;
}
}