fix;设置和深浅色
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:shadcn_ui/shadcn_ui.dart';
|
||||
|
||||
import '../../data/api/report_data_source.dart';
|
||||
import '../../theme/app_icons.dart';
|
||||
import '../../routing/app_routes.dart';
|
||||
import '../../theme/yanting_text.dart';
|
||||
import '../../theme/yanting_tokens.dart';
|
||||
import '../../widgets/app_buttons.dart';
|
||||
@@ -17,6 +20,7 @@ class ProfilePage extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final colors = ShadTheme.of(context).colorScheme;
|
||||
return ListView(
|
||||
padding: const EdgeInsets.fromLTRB(
|
||||
YantingSpacing.screenX,
|
||||
@@ -27,13 +31,13 @@ class ProfilePage extends StatelessWidget {
|
||||
children: [
|
||||
const PageHeader(title: '我的'),
|
||||
AppCard(
|
||||
color: YantingColors.secondary,
|
||||
color: colors.secondary,
|
||||
child: Row(
|
||||
children: [
|
||||
CircleAvatar(
|
||||
radius: 27,
|
||||
backgroundColor: YantingColors.background,
|
||||
foregroundColor: YantingColors.mutedForeground,
|
||||
backgroundColor: colors.background,
|
||||
foregroundColor: colors.mutedForeground,
|
||||
child: const Icon(AppIcons.user, size: 28),
|
||||
),
|
||||
const SizedBox(width: 15),
|
||||
@@ -43,12 +47,18 @@ class ProfilePage extends StatelessWidget {
|
||||
children: [
|
||||
Text(
|
||||
'未登录',
|
||||
style: YantingText.cardTitle.copyWith(fontSize: 18),
|
||||
style: YantingText.cardTitle.copyWith(
|
||||
fontSize: 18,
|
||||
color: colors.foreground,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 5),
|
||||
Text(
|
||||
'登录后同步收藏、历史和听单',
|
||||
style: YantingText.meta.copyWith(height: 1.5),
|
||||
style: YantingText.meta.copyWith(
|
||||
height: 1.5,
|
||||
color: colors.mutedForeground,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -79,7 +89,7 @@ class ProfilePage extends StatelessWidget {
|
||||
_MenuRow(
|
||||
icon: AppIcons.settings,
|
||||
title: '设置',
|
||||
onTap: () => showAppToast(context, '设置待接入'),
|
||||
onTap: () => context.push(AppRoutes.settings),
|
||||
),
|
||||
_MenuRow(
|
||||
icon: AppIcons.fileList,
|
||||
@@ -95,7 +105,7 @@ class ProfilePage extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(height: YantingSpacing.x3),
|
||||
AppCard(
|
||||
color: YantingColors.secondary,
|
||||
color: colors.secondary,
|
||||
onTap: () => showOutboundSheet(context, title: '相关服务'),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
@@ -105,7 +115,7 @@ class ProfilePage extends StatelessWidget {
|
||||
Text(
|
||||
'了解相关服务',
|
||||
style: YantingText.body.copyWith(
|
||||
color: YantingColors.foreground,
|
||||
color: colors.foreground,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
@@ -116,7 +126,10 @@ class ProfilePage extends StatelessWidget {
|
||||
const SizedBox(height: 6),
|
||||
Text(
|
||||
'与你关注主题相关的延伸服务,内容不构成投资建议。',
|
||||
style: YantingText.meta.copyWith(height: 1.5),
|
||||
style: YantingText.meta.copyWith(
|
||||
height: 1.5,
|
||||
color: colors.mutedForeground,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -139,6 +152,7 @@ class _MenuGroup extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final colors = ShadTheme.of(context).colorScheme;
|
||||
return AppCard(
|
||||
padding: EdgeInsets.zero,
|
||||
child: Column(
|
||||
@@ -146,11 +160,7 @@ class _MenuGroup extends StatelessWidget {
|
||||
for (var index = 0; index < children.length; index++) ...[
|
||||
children[index],
|
||||
if (index != children.length - 1)
|
||||
const Divider(
|
||||
height: 1,
|
||||
thickness: 1,
|
||||
color: YantingColors.border,
|
||||
),
|
||||
Divider(height: 1, thickness: 1, color: colors.border),
|
||||
],
|
||||
],
|
||||
),
|
||||
@@ -173,19 +183,20 @@ class _MenuRow extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final colors = ShadTheme.of(context).colorScheme;
|
||||
return InkWell(
|
||||
onTap: onTap,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 15),
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(icon, size: 20, color: YantingColors.foreground),
|
||||
Icon(icon, size: 20, color: colors.foreground),
|
||||
const SizedBox(width: 13),
|
||||
Expanded(child: Text(title, style: YantingText.body)),
|
||||
if (trailing != null)
|
||||
DecoratedBox(
|
||||
decoration: BoxDecoration(
|
||||
color: YantingColors.secondary,
|
||||
color: colors.secondary,
|
||||
borderRadius: BorderRadius.circular(YantingRadius.pill),
|
||||
),
|
||||
child: Padding(
|
||||
@@ -195,14 +206,17 @@ class _MenuRow extends StatelessWidget {
|
||||
),
|
||||
child: Text(
|
||||
trailing!,
|
||||
style: YantingText.meta.copyWith(fontSize: 11.5),
|
||||
style: YantingText.meta.copyWith(
|
||||
fontSize: 11.5,
|
||||
color: colors.secondaryForeground,
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
else
|
||||
const Icon(
|
||||
Icon(
|
||||
AppIcons.arrowRight,
|
||||
color: YantingColors.mutedForeground,
|
||||
color: colors.mutedForeground,
|
||||
size: 20,
|
||||
),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user