init method

dynamic init(
  1. AtClientImpl? _atClientInstance,
  2. bool isUpdate,
  3. EventNotificationModel? eventData
)

Implementation

init(AtClientImpl? _atClientInstance, bool isUpdate,
    EventNotificationModel? eventData) {
  if (eventData != null) {
    EventService().eventNotificationModel = EventNotificationModel.fromJson(
        jsonDecode(EventNotificationModel.convertEventNotificationToJson(
            eventData)));
    createContactListFromGroupMembers();
    update();
  } else {
    eventNotificationModel = EventNotificationModel();
    eventNotificationModel!.venue = Venue();
    eventNotificationModel!.event = Event();
    eventNotificationModel!.group = AtGroup('');
    selectedContacts = [];
  }
  isEventUpdate = isUpdate;
  print('isEventUpdate:$isEventUpdate');
  atClientInstance = _atClientInstance;
  Future.delayed(Duration(milliseconds: 50), () {
    eventSink.add(eventNotificationModel);
  });
}