getSubList method
Implementation
List<Map<String, dynamic>> getSubList(
int offset, int limit, List<Map<String, dynamic>>? tempList) {
List<Map<String, dynamic>> subList = [];
if (tempList == null) return subList;
if (offset == -1) {
subList = tempList;
} else if (limit > 0 && limit + offset < tempList.length) {
subList = tempList.sublist(offset, limit + offset);
} else if (offset < tempList.length) {
subList = tempList.sublist(offset);
} else {
subList = tempList;
}
return subList;
}