amplify-flutter icon indicating copy to clipboard operation
amplify-flutter copied to clipboard

[Feature request] Enhancing Controller Support for Form Fields in Amplify Authenticator UI

Open angelorodem opened this issue 6 months ago • 4 comments

On which framework/platform would you like to see this feature implemented?

Flutter

Which UI component is this feature-request for?

Authenticator

Please describe your feature-request in detail.

Currently, the Amplify Authenticator UI for Flutter does not allow programmatic modification of form field values through a controller—unlike other conventional form fields. This limitation restricts use cases such as pre-populating a field with data retrieved from an API (for example, automatically setting a user’s address based on GPS coordinates) or auto-filling an SMS verification code.

To improve functionality and flexibility, it is recommended that the Authenticator UI Library, particularly the SignUpFormField, be extended to include controller support. This enhancement would enable developers to seamlessly manage form values, thereby expanding the component’s utility and improving overall user experience.

Please describe a solution you'd like.

Create a new controller class for the fields used in the Auth lib, and expose it on the form field.

angelorodem avatar Jun 10 '25 18:06 angelorodem

i have tried to manually change the widget.state.field but it's not reactive, when i change it the forms do not update even on setState.

angelorodem avatar Jun 10 '25 19:06 angelorodem

Hello @angelorodem, thanks for taking the time to open this feature request. I think this is a good suggestion that would enable quality of life features for customers. While we would need to review what fields would support this, I believe we could support something like this:

final _usernameController = TextEditingController(text: 'MY_USERNAME');
final _emailController = TextEditingController(text: 'MY_EMAIL');
final _addressController = TextEditingController(text: 'MY_ADDRESS');

...

Authenticator(
      signUpForm: SignUpForm.custom(
        fields: [
          SignUpFormField.username(controller: _usernameController, validator: _validateUsername),
          SignUpFormField.email(controller: _emailController, required: true),
          SignUpFormField.password(),
          SignUpFormField.passwordConfirmation(),
          SignUpFormField.address(controller: _addressController),
        ],
      ),

...

_addressController.text = 'MY_OTHER_ADDRESS';

I'll mark this as a feature request and we will provide any updates here!

tyllark avatar Jun 10 '25 22:06 tyllark

Ok, thanks @tyllark ! for my knowledge, do you have an ETA on mind?

Thank you.

angelorodem avatar Jun 13 '25 12:06 angelorodem

Hello @angelorodem, unfortunately we do not have an ETA at this time. When we do have an update we will post here.

tyllark avatar Jun 13 '25 19:06 tyllark

@tyllark can you review the open PR?

angelorodem avatar Nov 04 '25 14:11 angelorodem

Hello @angelorodem, thank you for the PR with a detailed explanation! I will review with the team and get back to you!

tyllark avatar Nov 05 '25 09:11 tyllark

Thanks @tyllark , can you review when time permits? or someone else from the team, please?

angelorodem avatar Nov 15 '25 17:11 angelorodem

Hello @angelorodem, sorry for the delay. I scheduled a meeting with the team to review the public API changes. I will post any feedback on the PR afterwards.

tyllark avatar Nov 18 '25 18:11 tyllark

This issue is now closed. Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one.

github-actions[bot] avatar Dec 10 '25 21:12 github-actions[bot]

Hello @angelorodem Amplify Authenticator 2.4.0 was just launched with this feature. We appreciate all the hard work you put into the PR and I think it is a great addition to Authenticator!

Please let me know if you run into any issues with the new release, otherwise we will close out this issue!

tyllark avatar Dec 11 '25 15:12 tyllark

Thanks for the help @tyllark !

angelorodem avatar Dec 11 '25 15:12 angelorodem

This issue is now closed. Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one.

github-actions[bot] avatar Dec 12 '25 19:12 github-actions[bot]