updateProfile method

void updateProfile({
  1. String? email,
  2. String? profilePicture,
  3. String? accountType,
  4. String? name,
})

Implementation

void updateProfile({
  String? email,
  String? profilePicture,
  String? accountType,
  String? name,
}) {
  var auth = _auth;
  if (auth != null) {
    var model = auth.copyWith(
      accountType: accountType,
      profile: auth.profile.copyWith(
        email: email,
        name: name,
        pictureUrl: profilePicture,
      ),
    );
    _auth = model;
    _controller.sink.add(
      model,
    );
  }
}