getCurrentOrgUsersList method
Future<List<User>> getCurrentOrgUsersList ()
This function fetch all the users in the current organization and return List
.
params: None
returns:
Future<List<User>>
: Current Organization Users List
Implementation
Future<List<User>> getCurrentOrgUsersList() async {
if (orgMembersList.isEmpty) {
orgMembersList = await organizationService
.getOrgMembersList(userConfig.currentOrg.id!);
}
// loop through list
orgMembersList.forEach((orgMember) {
_memberCheckedMap.putIfAbsent(orgMember.id!, () => false);
_memberCheckedMap.putIfAbsent(orgMember.id!, () => false);
});
// return list
return orgMembersList;
}