Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

[local_auth] support localizedFallbackTitle in IOSAuthMessages #5297

Merged
merged 2 commits into from
Apr 20, 2022

Conversation

furaiev
Copy link
Contributor

@furaiev furaiev commented Apr 19, 2022

Description

Add support localizedFallbackTitle in IOSAuthMessages.

Related Issues

#34638
#3806
Fixes #96390

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the relevant style guides and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/plugins repo does use dart format.)
  • I signed the CLA.
  • The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. [shared_preferences]
  • I listed at least one issue that this PR fixes in the description above.
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.
  • I updated CHANGELOG.md to add a description of the change, following repository CHANGELOG style.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@furaiev
Copy link
Contributor Author

furaiev commented Apr 20, 2022

@stuartmorgan could you please review it?
During switching to the federated version of the package, the localizedFallbackTitle was missed.

Copy link
Contributor

@stuartmorgan-g stuartmorgan-g left a 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!

@stuartmorgan-g
Copy link
Contributor

Adding @hellohuanlin or @BeMacized for second review.


@override
int get hashCode =>
lockOut.hashCode ^
goToSettingsButton.hashCode ^
goToSettingsDescription.hashCode ^
cancelButton.hashCode;
cancelButton.hashCode ^
localizedFallbackTitle.hashCode;
Copy link
Contributor

@hellohuanlin hellohuanlin Apr 20, 2022

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.

Copy link
Contributor

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;

Copy link
Contributor

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.

@stuartmorgan-g stuartmorgan-g added the waiting for tree to go green (Use "autosubmit") This PR is approved and tested, but waiting for the tree to be green to land. label Apr 20, 2022
@fluttergithubbot fluttergithubbot merged commit f29c36c into flutter:main Apr 20, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 21, 2022
mauricioluz pushed a commit to mauricioluz/plugins that referenced this pull request Jan 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
p: local_auth platform-ios waiting for tree to go green (Use "autosubmit") This PR is approved and tested, but waiting for the tree to be green to land.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[local_auth] IOS FaceID should fallback to Passcode but does not
4 participants