updateUserBio method

  1. @override
Future<void> updateUserBio(
  1. UserBio? bio
)
override

Updates or resets the MyUser.bio field of the authenticated MyUser.

Implementation

@override
Future<void> updateUserBio(UserBio? bio) async {
  Log.debug('updateUserBio($bio)', '$runtimeType');

  await _debounce(
    field: MyUserField.bio,
    current: () => myUser.value?.bio,
    saved: () async => (await _active)?.value.bio,
    value: bio,
    mutation: (v, _) => _graphQlProvider.updateUserBio(v),
    update: (v, _) => myUser.update((u) => u?.bio = v),
  );
}