isSubsetOf method

bool isSubsetOf(
  1. ClassDefinition other
)

Implementation

bool isSubsetOf(ClassDefinition other) {
  final keys = fields.keys.toList();
  final len = keys.length;
  for (var i = 0; i < len; i++) {
    var otherTypeDef = other.fields[keys[i]];
    if (otherTypeDef != null) {
      var typeDef = fields[keys[i]];
      if (typeDef != otherTypeDef) {
        return false;
      }
    } else {
      return false;
    }
  }
  return true;
}