forgotPassword method
Implementation
Future<Map<String, dynamic>?> forgotPassword(String email) async {
final response = await http.post(
Uri.parse('$baseUrl/api/ibl/v1/authentication/forget-password/'),
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
},
// Encoding email as form data
body: 'email=${Uri.encodeComponent(email)}',
);
var data = json.decode(response.body);
return data; // Returns the API response
}