secure method
Generate a secure URL (HTTPS) to the given path.
Implementation
String secure(String path, {Map<String, dynamic>? query}) {
var secureUrl = url(path, query: query);
if (secureUrl.startsWith('http://')) {
secureUrl = secureUrl.replaceFirst('http://', 'https://');
}
return secureUrl;
}