searchPerson method
Implementation
Future<(List<SearchPerson>?, String?)> searchPerson(
SearchPersonRequest request,
) async {
var response = await _bridge.invokeMethod(
"searchPerson",
[request.toJson()],
);
var jsonObject = _decode(response);
List<SearchPerson>? data = null;
if (jsonObject["data"] != null) {
data = [];
for (var item in jsonObject["data"]) {
data.add(SearchPerson.fromJson(item)!);
}
}
String? error = jsonObject["error"];
return (data, error);
}