mobxjs / mobx.dart

MobX for the Dart language. Hassle-free, reactive state-management for your Dart and Flutter apps.
https://mobx.netlify.app
MIT License
2.39k stars 310 forks source link

feat: Added automatic generation of `==` and `hashCode` method with `@StoreConfig` #972

Open amondnet opened 8 months ago

amondnet commented 8 months ago

Describe the changes proposed in this Pull Request.

Added automatic generation of == and hasCode method with @StoreConfig


Pull Request Checklist

netlify[bot] commented 8 months ago

Deploy request for mobx pending review.

Visit the deploys page to approve it

Name Link
Latest commit e5e72e537c8ce332aab836aa558cac62aae7cf81
codecov[bot] commented 8 months ago

Codecov Report

Merging #972 (e5e72e5) into main (52515a1) will decrease coverage by 1.30%. The diff coverage is 34.88%.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/mobxjs/mobx.dart/pull/972/graphs/tree.svg?width=650&height=150&src=pr&token=YjGMFvwbrl&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mobxjs)](https://app.codecov.io/gh/mobxjs/mobx.dart/pull/972?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mobxjs) ```diff @@ Coverage Diff @@ ## main #972 +/- ## ========================================== - Coverage 99.00% 97.70% -1.30% ========================================== Files 57 57 Lines 2005 2047 +42 ========================================== + Hits 1985 2000 +15 - Misses 20 47 +27 ``` | [Flag](https://app.codecov.io/gh/mobxjs/mobx.dart/pull/972/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mobxjs) | Coverage Δ | | |---|---|---| | [flutter_mobx](https://app.codecov.io/gh/mobxjs/mobx.dart/pull/972/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mobxjs) | `100.00% <ø> (ø)` | | | [mobx](https://app.codecov.io/gh/mobxjs/mobx.dart/pull/972/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mobxjs) | `96.69% <0.00%> (-1.88%)` | :arrow_down: | | [mobx_codegen](https://app.codecov.io/gh/mobxjs/mobx.dart/pull/972/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mobxjs) | `100.00% <100.00%> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mobxjs#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files](https://app.codecov.io/gh/mobxjs/mobx.dart/pull/972?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mobxjs) | Coverage Δ | | |---|---|---| | [mobx\_codegen/lib/src/store\_class\_visitor.dart](https://app.codecov.io/gh/mobxjs/mobx.dart/pull/972?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mobxjs#diff-bW9ieF9jb2RlZ2VuL2xpYi9zcmMvc3RvcmVfY2xhc3NfdmlzaXRvci5kYXJ0) | `100.00% <100.00%> (ø)` | | | [mobx\_codegen/lib/src/template/store.dart](https://app.codecov.io/gh/mobxjs/mobx.dart/pull/972?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mobxjs#diff-bW9ieF9jb2RlZ2VuL2xpYi9zcmMvdGVtcGxhdGUvc3RvcmUuZGFydA==) | `100.00% <100.00%> (ø)` | | | [mobx/lib/src/api/annotations.dart](https://app.codecov.io/gh/mobxjs/mobx.dart/pull/972?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mobxjs#diff-bW9ieC9saWIvc3JjL2FwaS9hbm5vdGF0aW9ucy5kYXJ0) | `80.00% <0.00%> (ø)` | | | [mobx/lib/src/api/store.dart](https://app.codecov.io/gh/mobxjs/mobx.dart/pull/972?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mobxjs#diff-bW9ieC9saWIvc3JjL2FwaS9zdG9yZS5kYXJ0) | `14.28% <0.00%> (-85.72%)` | :arrow_down: | | [mobx/lib/src/utils.dart](https://app.codecov.io/gh/mobxjs/mobx.dart/pull/972?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mobxjs#diff-bW9ieC9saWIvc3JjL3V0aWxzLmRhcnQ=) | `34.37% <0.00%> (-65.63%)` | :arrow_down: | ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/mobxjs/mobx.dart/pull/972?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mobxjs). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mobxjs) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/mobxjs/mobx.dart/pull/972?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mobxjs). Last update [52515a1...e5e72e5](https://app.codecov.io/gh/mobxjs/mobx.dart/pull/972?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mobxjs). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mobxjs).