ContactEventHandler constructor Null safety

ContactEventHandler(
  1. {void onContactAdded(
    1. String userId
    )?,
  2. void onContactDeleted(
    1. String userId
    )?,
  3. void onContactInvited(
    1. String userId,
    2. String? reason
    )?,
  4. void onFriendRequestAccepted(
    1. String userId
    )?,
  5. void onFriendRequestDeclined(
    1. String userId
    )?}
)

The contact updates listener callback.

Param onContactAdded Current user is added as a contact by another user callback.

Param onContactDeleted Current user is removed from the contact list by another user callback.

Param onContactInvited Current user receives a friend request callback.

Param onFriendRequestAccepted A friend request is approved callback.

Param onFriendRequestDeclined A friend request is declined callback.

Implementation

ContactEventHandler({
  this.onContactAdded,
  this.onContactDeleted,
  this.onContactInvited,
  this.onFriendRequestAccepted,
  this.onFriendRequestDeclined,
});