flutter_login icon indicating copy to clipboard operation
flutter_login copied to clipboard

Unable to assign values to Additional Fields

Open MarkAStepp opened this issue 5 months ago • 0 comments

Describe the bug The additionalSignupFields seem to be assigned before the user is logged in. I tried to assign the defaultValue from information after a google authentication but nothing happens because the default values are still blank when it is assigned.

I can get to the additionalSignupData prior to it showing the additional fields card but I can't seem to be able to assign the values of the fields. it is showing that the additionalSignupData is null at the point it gets to onSwitchToAdditionalFields.

  onSwitchToAdditionalFields: (signupData) {
    signupData.additionalSignupData?.addAll({
      'first_name': google_given_name,
      'last_name': google_family_name,
    });
    return Future.value(null);
  },
  
  

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior Be able to assign the additionalSignupData prior to showing the additional data card

Screenshots If applicable, add screenshots to help explain your problem.

Information (please complete the following information):

  • Device: MacBookPro
  • Platform Web
  • Flutter version: Flutter (Channel stable, 3.24.2, on macOS 14.6.1 23G93 darwin-x64, locale en-US)
  • Package version flutter_login: ^5.0.0

Additional context Sample code to make this happen would be helpful if I'm simply doing it incorrectly.

MarkAStepp avatar Sep 17 '24 18:09 MarkAStepp