renderEquals static method
Implementation
static renderEquals(String clazz, Iterable<SerField> fields) {
if (fields.isEmpty) return '';
return (LambdaContext _) => """
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is $clazz &&
runtimeType == other.runtimeType &&
${fields.map((e) {
final id = e.id!.toCamelCase();
return "this.$id == other.$id";
}).join("&&")};
""";
}