isFollowing static method
Check if a user follows a community entity, like topic or user.
id
User id.
query
Query parameter.
Implementation
static Future<Map<String, bool>> isFollowing(UserId id, FollowQuery query) {
Map<String, dynamic> isFollowingBody = {
'userId': id.toJSON(),
'query': query.toJSON()
};
return NativeBridge.async(
'Communities.isFollowing', jsonEncode(isFollowingBody))
.then((result) {
Map<String, dynamic> jsonMap = jsonDecode(result);
return jsonMap.map((key, value) => MapEntry(key, value));
});
}