style: 增强我的页渐变与图标配色
This commit is contained in:
1 parent
647f6afd77
commit
a81bec4d47
6 files changed
+116
-49
No files matched your search
@@ -84,13 +84,21 @@ abstract final class AppColors {
|
||||
/// 「我的」页卡片与描边。
|
||||
static const mineCard = Color(0xFF16161A);
|
||||
static const mineOutline = Color(0xFF4A4A4A);
|
||||
static const mineGradientTop = Color(0xFF1A0F0A);
|
||||
static const mineGradientMiddle = Color(0xFF0D0908);
|
||||
static const mineGradientTop = Color(0xFF3A1B0E);
|
||||
static const mineGradientMiddle = Color(0xFF1A0C07);
|
||||
static const mineGradientBottom = Color(0xFF000000);
|
||||
static const mineGradientGlow = Color(0x33FF6B2C);
|
||||
static const mineGridSurface = Color(0x99101010);
|
||||
static const mineGridDivider = Color(0xFF2A2A2A);
|
||||
static const mineGridIconSurface = Color(0xFF1C1C1E);
|
||||
static const mineGridLabel = Color(0xFFE6E6EB);
|
||||
static const mineIconWallet = Color(0xFFF5C451);
|
||||
static const mineIconDownloads = Color(0xFF4DA3FF);
|
||||
static const mineIconHistory = Color(0xFF4ADE80);
|
||||
static const mineIconPreferences = Color(0xFFFF6B9A);
|
||||
static const mineIconSupport = Color(0xFFA78BFA);
|
||||
static const mineIconLanguage = Color(0xFF22D3EE);
|
||||
static const mineIconSettings = Color(0xFFA1A1AA);
|
||||
|
||||
/// 次级文字与列表 chevron。
|
||||
static const textPrimary = Color(0xFFFFFFFF);
|
||||
|
||||
@@ -179,7 +179,6 @@ abstract final class AppDimens {
|
||||
|
||||
/// 「我的」页中性视觉。
|
||||
static const double mineCardRadius = 16;
|
||||
static const double minePageTitle = 17;
|
||||
static const double mineSectionTitle = 15;
|
||||
static const double mineAvatar = 56;
|
||||
static const double mineUserName = 20;
|
||||
|
||||
@@ -80,7 +80,6 @@ class _MyPageState extends State<MyPage> {
|
||||
}
|
||||
|
||||
Widget _page(BuildContext context) {
|
||||
final l10n = AppLocalizations.of(context)!;
|
||||
final content = DecoratedBox(
|
||||
key: const Key('mine-page-surface'),
|
||||
decoration: const BoxDecoration(
|
||||
@@ -92,18 +91,32 @@ class _MyPageState extends State<MyPage> {
|
||||
AppColors.mineGradientMiddle,
|
||||
AppColors.mineGradientBottom,
|
||||
],
|
||||
stops: [0, 0.48, 1],
|
||||
stops: [0, 0.4, 0.75],
|
||||
),
|
||||
),
|
||||
child: SafeArea(
|
||||
bottom: false,
|
||||
child: Column(
|
||||
children: [
|
||||
_topBar(l10n),
|
||||
Expanded(child: _body(context)),
|
||||
if (!embedded) _bottomNav(),
|
||||
],
|
||||
),
|
||||
child: Stack(
|
||||
fit: StackFit.expand,
|
||||
children: [
|
||||
const DecoratedBox(
|
||||
key: Key('mine-page-glow'),
|
||||
decoration: BoxDecoration(
|
||||
gradient: RadialGradient(
|
||||
center: Alignment(0, -0.95),
|
||||
radius: 0.9,
|
||||
colors: [AppColors.mineGradientGlow, AppColors.transparent],
|
||||
),
|
||||
),
|
||||
),
|
||||
SafeArea(
|
||||
bottom: false,
|
||||
child: Column(
|
||||
children: [
|
||||
Expanded(child: _body(context)),
|
||||
if (!embedded) _bottomNav(),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
return AnnotatedRegion<SystemUiOverlayStyle>(
|
||||
@@ -117,29 +130,6 @@ class _MyPageState extends State<MyPage> {
|
||||
);
|
||||
}
|
||||
|
||||
Widget _topBar(AppLocalizations l10n) {
|
||||
return SizedBox(
|
||||
height: AppDimens.contentHeaderHeight,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: AppDimens.pageHorizontal,
|
||||
),
|
||||
child: Align(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Text(
|
||||
l10n.myTab,
|
||||
style: const TextStyle(
|
||||
fontFamily: 'Outfit',
|
||||
color: AppColors.textPrimary,
|
||||
fontSize: AppDimens.minePageTitle,
|
||||
fontWeight: FontWeight.w700,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _body(BuildContext context) {
|
||||
return ListView(
|
||||
key: const Key('mine-page-scroll'),
|
||||
|
||||
@@ -153,6 +153,7 @@ class MineMenuList extends StatelessWidget {
|
||||
index: 0,
|
||||
actionKey: const Key('mine-wallet'),
|
||||
icon: Icons.account_balance_wallet_outlined,
|
||||
iconColor: AppColors.mineIconWallet,
|
||||
label: l10n.wallet,
|
||||
onTap: () => onOpen(MineDestination.wallet),
|
||||
),
|
||||
@@ -160,6 +161,7 @@ class MineMenuList extends StatelessWidget {
|
||||
index: 1,
|
||||
actionKey: const Key('mine-downloads'),
|
||||
icon: Icons.download_outlined,
|
||||
iconColor: AppColors.mineIconDownloads,
|
||||
label: l10n.offlineDownloads,
|
||||
onTap: () => onOpen(MineDestination.downloads),
|
||||
),
|
||||
@@ -167,6 +169,7 @@ class MineMenuList extends StatelessWidget {
|
||||
index: 2,
|
||||
actionKey: const Key('mine-history'),
|
||||
icon: Icons.history_rounded,
|
||||
iconColor: AppColors.mineIconHistory,
|
||||
label: l10n.watchHistory,
|
||||
onTap: () => onOpen(MineDestination.history),
|
||||
),
|
||||
@@ -174,6 +177,7 @@ class MineMenuList extends StatelessWidget {
|
||||
index: 3,
|
||||
actionKey: const Key('mine-watch-preferences'),
|
||||
icon: Icons.tune_rounded,
|
||||
iconColor: AppColors.mineIconPreferences,
|
||||
label: l10n.watchPreferences,
|
||||
onTap: () => onOpen(MineDestination.preferences),
|
||||
),
|
||||
@@ -185,6 +189,7 @@ class MineMenuList extends StatelessWidget {
|
||||
index: 4,
|
||||
actionKey: const Key('mine-help'),
|
||||
icon: Icons.support_agent_rounded,
|
||||
iconColor: AppColors.mineIconSupport,
|
||||
label: l10n.contactSupport,
|
||||
onTap: () => onOpen(MineDestination.help),
|
||||
),
|
||||
@@ -192,6 +197,7 @@ class MineMenuList extends StatelessWidget {
|
||||
index: 5,
|
||||
actionKey: const Key('mine-language'),
|
||||
icon: Icons.language_rounded,
|
||||
iconColor: AppColors.mineIconLanguage,
|
||||
label: l10n.language,
|
||||
onTap: onLanguage,
|
||||
),
|
||||
@@ -199,6 +205,7 @@ class MineMenuList extends StatelessWidget {
|
||||
index: 6,
|
||||
actionKey: const Key('mine-settings'),
|
||||
icon: Icons.settings_outlined,
|
||||
iconColor: AppColors.mineIconSettings,
|
||||
label: l10n.settings,
|
||||
onTap: () => onOpen(MineDestination.settings),
|
||||
),
|
||||
@@ -215,6 +222,7 @@ class MineMenuList extends StatelessWidget {
|
||||
required int index,
|
||||
Key? actionKey,
|
||||
IconData? icon,
|
||||
Color? iconColor,
|
||||
String? label,
|
||||
VoidCallback? onTap,
|
||||
}) {
|
||||
@@ -237,10 +245,16 @@ class MineMenuList extends StatelessWidget {
|
||||
color: AppColors.mineGridIconSurface,
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
child: Icon(
|
||||
icon,
|
||||
color: AppColors.primary,
|
||||
size: AppDimens.mineGridIcon,
|
||||
child: DecoratedBox(
|
||||
decoration: BoxDecoration(
|
||||
color: iconColor?.withValues(alpha: 0.08),
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
child: Icon(
|
||||
icon,
|
||||
color: iconColor,
|
||||
size: AppDimens.mineGridIcon,
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: AppDimens.spaceXs + 2),
|
||||
|
||||
Reference in new issue
Block a user