EditableUserDisplayName constructor

const EditableUserDisplayName({
  1. Key? key,
  2. FirebaseAuth? auth,
})

A widget that displays user name and allows to edit it. If the user name is not provided by neither of the providers, a text field is being shown. Otherwise, a user name is rendered with the edit icon.

If you want to perform an action after display name is changed, you can use DisplayNameChangedAction.

Example usage:

ProfileScreen(
  actions: [
    DisplayNameChangedAction((context, oldName, newName) {
      // Do something with the new name.
   }),
 ],
);

Implementation

const EditableUserDisplayName({
  super.key,
  this.auth,
});