Solution
import 'dart:developer';
import 'package:http/http.dart' as http;
Future postExample() async{
final url = Uri.parse('https://your-url.com');
final response = await http.post(url, headers{}, body{});//add required data in headers and body although for logging in the header would typically be empty
log(response.body); //This is just to see the output in the terminal
}