bloc
bloc copied to clipboard
refactor(bloc): calculate composite object hashes through `Object.hashAll`
Hi!
In Dart version 2.14 class Object obtained a new static method – hashAll.
There are two places where bitwise XOR is used to combine hashes: here and here.
The package's current minimal version is 2.12, but I think that it's worth keeping in mind for the future.
Hey @purplenoodlesoop 👋 Thanks for opening an issue!
I’m aware of this but didn’t think it’s worth bumping the sdk constraint to 2.14 just for this change since this implementation has been untouched for a while now.
If we have a better reason to upgrade to Dart 2.14 then we can make this change as well but for now I’d prefer to leave it as is unless you’re running into specific issues.
Let me know what you think and thanks again!
I’m aware of this but didn’t think it’s worth bumping the sdk constraint to 2.14 just for this change since this implementation has been untouched for a while now. If we have a better reason to upgrade to Dart 2.14 then we can make this change...
Oh, I totally agree with the fact that it is not worth bumping the minimal version only because of this static method, as I stated in the original issue, "I think that it's worth keeping in mind for the future." :)
I realise it's not a high priority issue, but I noticed that a couple of other 'fundamental' packages are already >= 2.14, for example:
so probably it wouldn't break too many apps :)