toJson method

Map<String, dynamic> toJson()

Converts a CallLogModel instance to a JSON map.

This method serializes the CallLogModel instance into a JSON map, making it easy to encode the call log data into a JSON string for storage or transmission.

Returns a JSON map representation of the CallLogModel.

Implementation

Map<String, dynamic> toJson() => {
      "data": data == null
          ? []
          : List<dynamic>.from(data!.map((x) => x.toJson())),
      "total_pages": totalPages,
    };