update method

dynamic update({
  1. bool? profileViewNotification,
  2. String? languageCode,
  3. bool? commentNotification,
})

Update the user setting data

If the value is null, it will not be updated.

null 을 저장할 수 없다. false 로 저장해야 한다. 즉, null 을 저장해서, 해당 필드를 삭제하려면, 이 함수를 사용해서는 안되고 다른 방법을 사용해야 한다.

Implementation

update({
  bool? profileViewNotification,
  String? languageCode,
  bool? commentNotification,
}) async {
  await ref.update({
    if (profileViewNotification != null)
      Field.profileViewNotification: profileViewNotification,
    if (languageCode != null) Field.languageCode: languageCode,
    if (commentNotification != null)
      Field.commentNotification: commentNotification,
  });
}