inviteMembers method

Future<InviteMembersResponse> inviteMembers (
  1. List<Member> members,
  2. Message message
)

Invite members to the channel

Implementation

Future<InviteMembersResponse> inviteMembers(
  List<Member> members,
  Message message,
) async {
  final res = await _client.post(_channelURL, data: {
    'invites': members.map((m) => m.toJson()),
    'message': message.toJson(),
  });
  return _client.decode(res.data, InviteMembersResponse.fromJson);
}