buildHashCode method

Future<void> buildHashCode(
  1. ClassDeclaration clazz,
  2. MemberDeclarationBuilder builder
)

Implementation

Future<void> buildHashCode(ClassDeclaration clazz, MemberDeclarationBuilder builder) async {
  builder.declareInType(DeclarationCode.fromString(asCode("""
  /// Creates the deep hash code of the ${clazz.identifier.name} object.
  @override
  int get hashCode => Model.deepHash(toMap());
  """)));
}