mirror of
https://github.com/lifegpc/eh_downloader_flutter.git
synced 2026-07-08 01:30:28 +08:00
refactor: Remove primaryColor parameter from setCurrentTitle function
This commit is contained in:
@@ -105,8 +105,7 @@ class _CacheSettingsPage extends State<CacheSettingsPage>
|
||||
Widget build(BuildContext context) {
|
||||
final i18n = AppLocalizations.of(context)!;
|
||||
if (isTop(context)) {
|
||||
setCurrentTitle("${i18n.settings} - ${i18n.cache}",
|
||||
Theme.of(context).primaryColor.value);
|
||||
setCurrentTitle("${i18n.settings} - ${i18n.cache}");
|
||||
}
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
|
||||
@@ -247,8 +247,7 @@ class _DisplaySettingsPage extends State<DisplaySettingsPage>
|
||||
Widget build(BuildContext context) {
|
||||
final i18n = AppLocalizations.of(context)!;
|
||||
if (isTop(context)) {
|
||||
setCurrentTitle("${i18n.settings} - ${i18n.display}",
|
||||
Theme.of(context).primaryColor.value);
|
||||
setCurrentTitle("${i18n.settings} - ${i18n.display}");
|
||||
}
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
|
||||
@@ -60,8 +60,7 @@ class _SearchSettingsPage extends State<SearchSettingsPage>
|
||||
Widget build(BuildContext context) {
|
||||
final i18n = AppLocalizations.of(context)!;
|
||||
if (isTop(context)) {
|
||||
setCurrentTitle("${i18n.settings} - ${i18n.search}",
|
||||
Theme.of(context).primaryColor.value);
|
||||
setCurrentTitle("${i18n.settings} - ${i18n.search}");
|
||||
}
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -79,8 +79,7 @@ class _ServerUrlSettingsPage extends State<ServerUrlSettingsPage>
|
||||
];
|
||||
if (hasBaseUrl) actions.add(buildMoreVertSettingsButon(context));
|
||||
if (isTop(context)) {
|
||||
setCurrentTitle("${i18n.settings} - ${i18n.setServerUrl}",
|
||||
Theme.of(context).primaryColor.value);
|
||||
setCurrentTitle("${i18n.settings} - ${i18n.setServerUrl}");
|
||||
}
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
|
||||
@@ -312,8 +312,7 @@ class _UserSettingsPage extends State<UserSettingsPage>
|
||||
Widget build(BuildContext context) {
|
||||
final i18n = AppLocalizations.of(context)!;
|
||||
if (isTop(context)) {
|
||||
setCurrentTitle("${i18n.settings} - ${i18n.user}",
|
||||
Theme.of(context).primaryColor.value);
|
||||
setCurrentTitle("${i18n.settings} - ${i18n.user}");
|
||||
}
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
|
||||
Reference in New Issue
Block a user