CallLogModel.fromJson constructor

CallLogModel.fromJson(
  1. Map<String, dynamic> json
)

Creates a CallLogModel instance from a JSON map.

This factory constructor parses a JSON map and creates a CallLogModel instance. It is used for decoding JSON data fetched from an API or stored locally.

json: The JSON map to parse.

Implementation

factory CallLogModel.fromJson(Map<String, dynamic> json) => CallLogModel(
      data: json["data"] == null
          ? []
          : List<CallLog>.from(json["data"]!.map((x) => CallLog.fromJson(x))),
      totalPages: json["total_pages"],
    );