Skip to content

Conversation

@tyllark
Copy link
Member

@tyllark tyllark commented Dec 1, 2025

Issue #, if available:

Description of changes:
DO NOT MERGE

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

…elds

- Introduced AuthenticatorTextFieldController for programmatic control over text fields.
- Updated mixins (AuthenticatorTextField, AuthenticatorUsernameField) to utilize the new controller.
- Enhanced various form fields (ConfirmSignIn, ConfirmSignUp, EmailSetup, PhoneNumber, ResetPassword, SignIn, SignUp, VerifyUser) to accept and manage TextEditingController.
- Added tests to ensure synchronization between form fields and their respective controllers.
…e sync timing

- Add nullable controller getter to AuthenticatorFormField and include it in diagnostics
- Add debugFillProperties implementations to form field widgets to surface the controller prop
- Rework text controller sync logic in AuthenticatorTextField and AuthenticatorUsernameField:
  - Skip syncing in initState and avoid syncing during build
  - Schedule post-frame callbacks in didChangeDependencies to first apply controller->state (if controller has initial text) then sync state->controller
- Minor conditional/formatting cleanup in username field sync
…tingController support for form fields

- Export AuthenticatorTextFieldController from package API.
- Integrate optional controller parameter into prebuilt form fields (sign-in, sign-up, confirm, reset password, verify user, email setup, etc.) with proper diagnostics.
- Ensure bidirectional sync between controllers and internal authenticator state.
- Add example demonstrating controller usage and pre-population (examples/authenticator_with_controllers.dart).
- Add comprehensive widget tests for controller <-> state synchronization, standard TextEditingController compatibility, and rapid updates.
- Update CHANGELOG with 2.4.0 notes.
… stabilize sync

Buffer controller changes and apply them in a post-frame callback to avoid
calling setState during build. Normalize trailing whitespace when comparing
controller and state to reduce unnecessary writes. Ensure didUpdateWidget
sync runs after build and clear pending state on dispose. Add widget tests
covering typing, special keys, rapid updates, and controller interactions.
- Add enabledOverride and visible to AuthenticatorFormField and include in diagnostics
- Use enabledOverride to determine enabled state; honor override in ConfirmSignUpFormField
- Render hidden fields offstage with Visibility maintaining state (so programmatic updates still sync)
- Propagate enabled/visible through SignUpFormField factory APIs and concrete field constructors
- Add tests verifying disabled fields still sync with controllers and hidden fields retain state synchronization
- Updated all form fields to replace TextEditingController with AuthenticatorTextFieldController.
- Modified constructors and properties across various form fields including ConfirmSignUpFormField, EmailSetupFormField, PhoneNumberField, ResetPasswordFormField, SignInFormField, SignUpFormField, and VerifyUserFormField.
- Adjusted tests to accommodate the new controller type, ensuring compatibility and functionality remain intact.
@tyllark tyllark requested a review from a team as a code owner December 1, 2025 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants