fetchUserProfiles method
User profiles
Implementation
Future<List<UserProfile>> fetchUserProfiles() async {
try {
var profiles =
await Onegini.instance.channel.invokeMethod(Constants.userProfiles);
return List<UserProfile>.from(
json.decode(profiles).map((x) => UserProfile.fromJson(x)));
} on TypeError catch (error) {
throw PlatformException(
code: Constants.wrapperTypeError.code.toString(),
message: Constants.wrapperTypeError.message,
stacktrace: error.stackTrace?.toString());
}
}