getHttpClient static method
Implementation
static HttpClient getHttpClient({Duration? duration}) {
HttpClient httpClient = HttpClient()
..connectionTimeout = duration ?? const Duration(seconds: 120)
..badCertificateCallback = ((X509Certificate cert, String host, int port) => trustSelfSigned);
return httpClient;
}