init method

void init(
  1. List<LocalContact>? contactList,
  2. List<String>? previewContactList,
  3. String from,
  4. String? contactName,
)

Implementation

void init(List<LocalContact>? contactList, List<String>? previewContactList,
    String from, String? contactName) {
  this.from = from;
  if (from == "chat" && previewContactList != null && contactName != null) {
    this.previewContactList = previewContactList;
    previewContactName = contactName;
  } else if (contactList != null) {
    argContactList = contactList;
  } else {
    debugPrint("Contact list is Empty");
  }
}