getParams method
Returns the parameters required for the getCallLogList
function.
Set isNext
to true to load the next page, or false to load the previous page.
Implementation
CallLogFilterParams getParams(bool isNext) {
final params = CallLogFilterParams();
if (isNext) {
params.page = currentPage + 1;
} else {
params.page = currentPage - 1;
}
params.perPage = limit;
params.hasRecordings = hasRecording;
if (callStatus != null && callStatus!.isNotEmpty) {
params.status = callStatus;
}
if (callType != null && callType!.isNotEmpty) {
params.type = callType;
}
if (callCategory != null && callCategory!.isNotEmpty) {
params.mode = callCategory;
}
if (callDirection != null && callDirection!.isNotEmpty) {
params.direction = callDirection;
}
if (uid != null && uid!.isNotEmpty) {
params.uid = uid;
}
if (guid != null && guid!.isNotEmpty) {
params.guid = guid;
}
return params;
}