renderHashCode static method

dynamic renderHashCode(
  1. Iterable<SerField> fields
)

Implementation

static renderHashCode(Iterable<SerField> fields) {
  if (fields.isEmpty) return '';
  return (LambdaContext _) => """
    @override
    int get hashCode =>
        ${fields.map((e) => "${e.id!.toCamelCase()}.hashCode").join("^")};
  """;
}