refactor: Remove primaryColor parameter from setCurrentTitle function

This commit is contained in:
2025-01-05 10:13:51 +08:00
parent 340e624d72
commit 2a6866fb26
17 changed files with 22 additions and 34 deletions

View File

@@ -119,9 +119,8 @@ class _ServerSettingsPage extends State<ServerSettingsPage>
final isLoading = _config == null && _error == null;
if (isLoading && !_isLoading) _fetchData();
final i18n = AppLocalizations.of(context)!;
final cs = Theme.of(context).colorScheme;
if (isTop(context)) {
setCurrentTitle("${i18n.settings} - ${i18n.server}", cs.primary.value);
setCurrentTitle("${i18n.settings} - ${i18n.server}");
}
return Scaffold(
appBar: isLoading
@@ -167,7 +166,9 @@ class _ServerSettingsPage extends State<ServerSettingsPage>
u.userInfo.isNotEmpty ||
u.hasFragment ||
!u.hasEmptyPath ||
!u.hasScheme) return i18n.invalidURLOrigin;
!u.hasScheme) {
return i18n.invalidURLOrigin;
}
if (u.scheme != "http" && u.scheme != "https") {
return i18n.httpHttpsNeeded;
}