getDepartmentList static method
get department List
Implementation
static Future<AuthResult> getDepartmentList(int page, int limit,
[bool? withCustomData, String? sortBy, String? orderBy]) async {
String withCustomDataStr =
withCustomData == null ? 'false' : withCustomData.toString();
String sortByStr = sortBy ?? 'JoinDepartmentAt';
String orderByStr = orderBy ?? 'Desc';
final Result result = await get('/api/v3/get-my-department-list?page=' +
page.toString() +
'&limit=' +
limit.toString() +
'&withCustomData=' +
withCustomDataStr +
'&sortBy=' +
sortByStr +
'&orderBy=' +
orderByStr);
AuthResult authResult = AuthResult(result);
return authResult;
}