ChatAccountModel.fromJson constructor

ChatAccountModel.fromJson(
  1. Map json
)

Implementation

factory ChatAccountModel.fromJson(Map json) {
  bool isOnline = json['isOnline'];
  Iterable<ChatAccountDepartmentModel> departments =
      (json['departments'] as Iterable)
          .map((d) => ChatAccountDepartmentModel.fromJson(d));
  return ChatAccountModel(isOnline, departments);
}