getUserList static method
Future<void>
getUserList({
- int page = 1,
- String search = "",
- int perPageResultSize = 20,
- MetaDataUserList? metaDataUserList,
- required dynamic flyCallback(
- FlyResponse response
Retrieves a list of users from the Mirrorfly platform.
Retrieves a paginated list of users based on the specified page
number and optional search query
.
The page
parameter specifies the page number to retrieve.
The optional search
parameter allows filtering users based on a search query.
The perPageResultSize
parameter specifies the number of users to retrieve per page (default is 20).
The flyCallback
parameter is a callback function that handles the response from the platform.
The metaDataUserList
parameter is optional and represents additional metadata associated with the User.
Example usage:
await Mirrorfly.getUserList(
page: 1,
search: "John Doe",
perPageResultSize: 10,
flyCallback: (response) {
// Handle the response from the Mirrorfly platform
if(response.isSuccess){
if (response.hasData) {
var list = userListFromJson(response.data);
}
}
}
);
Throws a PlatformException if an error occurs during the API call.
Implementation
static Future<void> getUserList(
{int page = 1,
String search = "",
int perPageResultSize = 20,
MetaDataUserList? metaDataUserList,
required Function(FlyResponse response) flyCallback}) {
return FlyChatFlutterPlatform.instance.getUserList(
page, search, metaDataUserList, flyCallback,
perPageResultSize: perPageResultSize);
}