refactor: Simplify platform-specific icon handling in AppCustomizationPage and ProfilePage
- Replaced direct platform checks with a utility method `UiUtils.platformIcon` for better readability and maintainability. - Updated localization strings for app customization to enhance clarity and consistency across multiple languages. - Adjusted icon colors in the UI to ensure proper theming and visual consistency.
This commit is contained in:
@@ -160,17 +160,6 @@ class ProfilePage extends ConsumerWidget {
|
||||
TextStyle(color: theme.textSecondary);
|
||||
|
||||
final supportTiles = [
|
||||
_buildSupportOption(
|
||||
context,
|
||||
icon: UiUtils.platformIcon(
|
||||
ios: CupertinoIcons.heart,
|
||||
android: Icons.favorite_border,
|
||||
),
|
||||
title: AppLocalizations.of(context)!.githubSponsorsTitle,
|
||||
subtitle: AppLocalizations.of(context)!.githubSponsorsSubtitle,
|
||||
url: _githubSponsorsUrl,
|
||||
color: theme.success,
|
||||
),
|
||||
_buildSupportOption(
|
||||
context,
|
||||
icon: UiUtils.platformIcon(
|
||||
@@ -182,6 +171,17 @@ class ProfilePage extends ConsumerWidget {
|
||||
url: _buyMeACoffeeUrl,
|
||||
color: theme.warning,
|
||||
),
|
||||
_buildSupportOption(
|
||||
context,
|
||||
icon: UiUtils.platformIcon(
|
||||
ios: CupertinoIcons.heart,
|
||||
android: Icons.favorite_border,
|
||||
),
|
||||
title: AppLocalizations.of(context)!.githubSponsorsTitle,
|
||||
subtitle: AppLocalizations.of(context)!.githubSponsorsSubtitle,
|
||||
url: _githubSponsorsUrl,
|
||||
color: theme.success,
|
||||
),
|
||||
];
|
||||
|
||||
return Column(
|
||||
|
||||
Reference in New Issue
Block a user