How can I set a user's displyName at the same time as creating their account?

I'm using the createUserWithEmailAndPassword method and trying to take the information from 3 different TextFormFields within the same Form.

Below is a very simple example of what I'm trying to do... Hopefully from this someone will be able to help..

Thanks

This is my signup method:

```
import 'package:firebase_auth/firebase_auth.dart';

class AuthService {
  FirebaseAuth auth = FirebaseAuth.instance;

  //Create user with email and password (+ displayName)
  signUp({String email, String password, String name}) async {
    await FirebaseAuth.instance
        .createUserWithEmailAndPassword(email: email, password: password);

        // I'd like to create/update the new user's displayName here, using the String value (name) being passed into this function.

  }
}

```

This is an example of where the data is coming from:

```
class SignUpForm extends StatelessWidget {
  final GlobalKey<FormState> _formKey = GlobalKey();

  String name;
  String email;
  String password;

  TextEditingController nameController;
  TextEditingController emailController;
  TextEditingController passwordController;

  submit(){
    AuthService().signUp(password: 'password', email: email, name: name);
  }

  @override
  Widget build(BuildContext context) {
    return Form(
      key: _formKey,
      child: Column(
        children: <Widget>[
          TextFormField(
            controller: nameController,
            onChanged: (value) {
              name = value;
            },
          ),
          TextFormField(
            controller: emailController,
            onChanged: (value) {
              email = value;
            },
          ),
          TextFormField(
            controller: passwordController,
            onChanged: (value) {
              password = value;
            },
          ),
        ],
      ),
    );
  }
}

```