feat: 配置 WebView 数据目录,优化 WebView 性能;更新 homeUrl 方法以支持更好的 URL 生成逻辑
This commit is contained in:
@@ -38,10 +38,13 @@ class AppConfig {
|
||||
|
||||
static String _normalizeHomeUrl(String host) {
|
||||
final value = host.trim();
|
||||
if (value.startsWith('http://') || value.startsWith('https://')) {
|
||||
return value.endsWith('/') ? value : '$value/';
|
||||
}
|
||||
return 'https://$value/';
|
||||
final normalized =
|
||||
value.startsWith('http://') || value.startsWith('https://')
|
||||
? value
|
||||
: 'https://$value';
|
||||
final uri = Uri.parse(normalized);
|
||||
final path = uri.path.isEmpty ? '/' : uri.path;
|
||||
return uri.replace(path: path).toString();
|
||||
}
|
||||
|
||||
static String _withShellBranding(
|
||||
|
||||
Reference in New Issue
Block a user