'EmailJS is not working after the april update in flutter

I tried to create an automatic emailing service in my flutter application using EmailJS, and did as it was mentioned in the documentation, but in the part where we have to specify the user_id, it was written in the documentation, that it is the Public key of my account. But, using the Public Key of my account as the user_id, gives me the following error:

The Public Key is required. To find this ID, visit https://dashboard.emailjs.com/account

My code for using the service is:

Future<void> sendEmailToParents() async{
print('send email to parents :))');
final serviceId='service_fm3ymlj';
final templateId='template_ru9gpkp';
final userId='SaGQJusVSIxIMGhiw';
print(userId);
final url = Uri.parse('https://api.emailjs.com/api/v1.0/email/send');
final response=await http.post(
    url,
  headers:{
      'ContentType': 'application/json',
  },
  body: json.encode({
      'service_id': serviceId,
      'template_id': templateId,
      'key': userId,
    'template_params': {
        'lost_child_name': _name,
        'user_name':_username,
        'user_contact_number':_user_contact_number,
        'user_email':widget.email,
        'location':_location,
        'police_address':_registered_lost_at,
        "parent's_email":_parent_email,
       // "child_img_url": image1
    },
  })
);

print(response.body);
}

Can someone please guide me on where am I going wrong? I used the public key from here

enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source