-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[local_auth] support localizedFallbackTitle in IOSAuthMessages #5297
Conversation
@stuartmorgan could you please review it? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with nits. Sorry about that regression; thanks for finding it so quickly and re-fixing!
packages/local_auth/local_auth_ios/ios/Classes/FLTLocalAuthPlugin.m
Outdated
Show resolved
Hide resolved
Adding @hellohuanlin or @BeMacized for second review. |
|
||
@override | ||
int get hashCode => | ||
lockOut.hashCode ^ | ||
goToSettingsButton.hashCode ^ | ||
goToSettingsDescription.hashCode ^ | ||
cancelButton.hashCode; | ||
cancelButton.hashCode ^ | ||
localizedFallbackTitle.hashCode; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just curious: i'm wondering does dart auto synthesize the hash function (like in swift)? manually implement this can be error prone (e.g. forgetting to include an attribute).
Also interesting choice using xor to combine hashes, because normally we use aBigPrimeNumber * A + B
. Using xor comes with a few drawbacks like missing order information, common collision with +x
, -x
pairs, etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for example, in java's Arrays we use
result = 31 * result + element;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also interesting choice using xor to combine hashes
We should update this to the new Object.hash
; that's out of scope for this PR though. I'll do a sweep for old manual hash implementations and send you a PR.
Description
Add support localizedFallbackTitle in IOSAuthMessages.
Related Issues
#34638
#3806
Fixes #96390
Pre-launch Checklist
dart format
.)[shared_preferences]
pubspec.yaml
with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.CHANGELOG.md
to add a description of the change, following repository CHANGELOG style.///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.