hash_compare 0.1.0+1 icon indicating copy to clipboard operation
hash_compare: ^0.1.0+1 copied to clipboard

[pending analysis]

Hash and compare function generator

Hash and compare function generator #

This Dart source generator automatically generates hash and compare functions that you can use in your classes. The generated functions internally use quiver for hashing and can automatically deal with lists, sets and maps. The naming convention for the generated functions is _hashMyClass and _compareMyClass. Annotate classes with @hashCompare to generate these functions.

Usage #

To use this generator, add the following to your pubspec.yaml:

dev_dependencies:
  hash_compare: any
  build_runner: any
  build_verify: any

And add this to build.yaml:

targets:
  $default:
    builders:
      hash_compare:
        generate_for:
        - lib/**.dart

To build use pub run build_runner build or similar commands. To make sure the build is updated when testing, add an expectBuildClean assertion to your test code. When publishing to Pub you need to include generated files.

0
likes
--
pub points
--%
popularity

Publisher

unverified uploader

Hash and compare function generator

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

analyzer, build, build_config, source_gen

More

Packages that depend on hash_compare