getUserList method
Future<void>
getUserList(
- int page,
- String search,
- MetaDataUserList? metaDataUserList,
- dynamic callback(
- FlyResponse response
- int perPageResultSize = 20,
override
This method is used to get the user list.
Implementation
@override
Future<void> getUserList(
int page,
String search,
MetaDataUserList? metaDataUserList,
Function(FlyResponse response)? callback,
{int perPageResultSize = 20}) async {
String? re;
try {
re = await mirrorFlyMethodChannel.invokeMethod("get_user_list", {
"page": page,
"search": search,
"perPageResultSize": perPageResultSize,
"metaDataUserList": metaDataUserList?.toMap()
});
var res = convertUsersDataJsonFromString(re);
callback?.call(FlyResponse(true, res, "users list fetched"));
} on PlatformException catch (e) {
LogMessage.d("Platform Exception =", " $e");
callback?.call(FlyResponse(false, FlyConstants.empty, FlyConstants.empty,
FlyException(e.code, e.message, e.details)));
} on Exception catch (e) {
LogMessage.d("Exception ", " $e");
callback?.call(FlyResponse(false, FlyConstants.empty, FlyConstants.empty,
FlyException(FlyErrorCode.unHandle, FlyErrorMessage.unHandle, e)));
}
}