onInit method

  1. @override
void onInit()
override

Called immediately after the widget is allocated in memory. You might use this to initialize something for the controller.

Implementation

@override
void onInit() {
  email.text = '';
  firstName.text = '';
  lastName.text = '';
  phoneNumber.text = '';
  address.text = '';
  gender = genderList.first;
  email.addListener(() {
    update();
  });
  firstName.addListener(() {
    update();
  });
  lastName.addListener(() {
    update();
  });
  phoneNumber.addListener(() {
    update();
    address.addListener(() {
      update();
    });
  });
  super.onInit();
}