get method

Future<Group?> get(
  1. String groupId, {
  2. bool withContactCount = false,
})

Gets a single group by ID.

groupId - The ID of the group to fetch. withContactCount - Whether to include the number of contacts in the group.

Implementation

Future<Group?> get(String groupId, {bool withContactCount = false}) async {
  final result = await _channel.invokeMethod<Map>('groups.get', {
    'groupId': groupId,
    'withContactCount': withContactCount,
  });
  return JsonHelpers.decode(result, Group.fromJson);
}