firebase / FirebaseUI-Flutter

Apache License 2.0
90 stars 79 forks source link

feat(firebase_ui_auth): add autofocus property to PhoneInput widget #334

Closed orenagiv closed 1 month ago

orenagiv commented 2 months ago

Description

When using the PhoneInput widget as described in the "Using widget" or "Building a custom widget" sections here, it usually means there are additional fields or other widgets on screen, and therefore the autofocus: true which is currently hard-coded into the PhoneInput widget might conflict with the desired UX of that screen.

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process. Updating the pubspec.yaml and changelogs is not required.

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

russellwheatley commented 2 months ago

Hey @orenagiv - thank you for the PR, could you create a small example app demonstrating this use case, please?

orenagiv commented 2 months ago

Hey @russellwheatley Sure - will send an example ASAP.

orenagiv commented 2 months ago

Hey @russellwheatley,

The example app can be found here: https://github.com/orenagiv/firebase_ui_auth_example

You can use the following phone number and verification code to test the flow:

Test phone number: +1 650-555-1234
Verification code: 123456

The relevant Widget which demonstrates the usage of the Firebase UI Auth flow is:

widgets/sign_in_with_mobile.dart

Please let me know if you need anything else.

russellwheatley commented 2 months ago

@orenagiv - thank you! I'll take a look at some point this week👌