and so on
This commit is contained in:
@@ -3,6 +3,8 @@ import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:maibu_satabot_v2/core/app/app_user_cubit.dart';
|
||||
import 'package:maibu_satabot_v2/core/localization/app_localizations.dart';
|
||||
import 'package:maibu_satabot_v2/core/theme/AppTheme.dart';
|
||||
import 'package:maibu_satabot_v2/core/theme/theme_cubit.dart';
|
||||
import 'package:maibu_satabot_v2/features/v2/my/presentation/cubit/my_cubit.dart';
|
||||
import 'package:maibu_satabot_v2/features/v2/my/presentation/states/my_state.dart';
|
||||
import 'package:maibu_satabot_v2/features/v2/my/di/my_di.dart';
|
||||
@@ -38,7 +40,7 @@ class _MyPageContent extends StatelessWidget {
|
||||
),
|
||||
child: Scaffold(
|
||||
extendBodyBehindAppBar: true,
|
||||
backgroundColor: MyColors.background,
|
||||
backgroundColor: context.appColors.pageBackground,
|
||||
body: BlocConsumer<MyCubit, MyState>(
|
||||
listener: (context, state) {
|
||||
if (state is MyError) {
|
||||
@@ -59,6 +61,9 @@ class _MyPageContent extends StatelessWidget {
|
||||
final appUserState = context.watch<AppUserCubit>().state;
|
||||
final user = appUserState.user;
|
||||
|
||||
// 🔥 监听全局主题状态,夜间模式开关的真实值以 ThemeCubit 为准
|
||||
final isDarkMode = context.watch<ThemeCubit>().isDarkMode;
|
||||
|
||||
// 获取用户信息(优先使用昵称,其次用户名)
|
||||
final userName = user?.nickname ?? user?.username ?? '未知用户';
|
||||
final userRole = user?.email ?? user?.phone ?? '未设置';
|
||||
@@ -104,11 +109,11 @@ class _MyPageContent extends StatelessWidget {
|
||||
bottom: 16,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
color: context.appColors.cardBackground,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: const Color(0x0D000000),
|
||||
color: context.appColors.cardShadow,
|
||||
blurRadius: 10,
|
||||
offset: const Offset(0, 2),
|
||||
),
|
||||
@@ -123,11 +128,22 @@ class _MyPageContent extends StatelessWidget {
|
||||
itemCount: state.menuItems.length,
|
||||
itemBuilder: (context, index) {
|
||||
final item = state.menuItems[index];
|
||||
// 🔥 夜间模式开关值以全局 ThemeCubit 状态为准
|
||||
final displayItem = item.id == 'night_mode'
|
||||
? item.copyWith(switchValue: isDarkMode)
|
||||
: item;
|
||||
return MenuItemCard(
|
||||
item: item,
|
||||
item: displayItem,
|
||||
onTap: () => _handleMenuItemTap(context, cubit, item),
|
||||
onSwitchChanged: item.hasSwitch
|
||||
? (value) => cubit.toggleNightMode(value)
|
||||
? (value) {
|
||||
// 更新菜单 UI 状态
|
||||
cubit.toggleNightMode(value);
|
||||
// 🔥 真正切换全局主题
|
||||
context
|
||||
.read<ThemeCubit>()
|
||||
.toggleDarkMode(value);
|
||||
}
|
||||
: null,
|
||||
);
|
||||
},
|
||||
|
||||
@@ -3,6 +3,7 @@ import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:maibu_satabot_v2/core/app/app_user_cubit.dart';
|
||||
import 'package:maibu_satabot_v2/core/app/app_user_state.dart';
|
||||
import 'package:maibu_satabot_v2/core/domain/entities/user_entity.dart';
|
||||
import 'package:maibu_satabot_v2/core/theme/AppTheme.dart';
|
||||
|
||||
/// 个人信息详情页
|
||||
class ProfileDetailPage extends StatelessWidget {
|
||||
@@ -11,12 +12,11 @@ class ProfileDetailPage extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: const Color(0xFFF5F7FA),
|
||||
backgroundColor: context.appColors.pageBackground,
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.white,
|
||||
elevation: 0,
|
||||
leading: IconButton(
|
||||
icon: const Icon(Icons.arrow_back, color: Color(0xFF1D2129)),
|
||||
icon: Icon(Icons.arrow_back, color: context.appColors.textPrimary),
|
||||
onPressed: () => Navigator.pop(context),
|
||||
),
|
||||
title: const Text(
|
||||
@@ -24,7 +24,6 @@ class ProfileDetailPage extends StatelessWidget {
|
||||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Color(0xFF1D2129),
|
||||
),
|
||||
),
|
||||
centerTitle: true,
|
||||
@@ -43,11 +42,11 @@ class ProfileDetailPage extends StatelessWidget {
|
||||
padding: const EdgeInsets.all(16),
|
||||
children: [
|
||||
// 头像卡片
|
||||
_buildAvatarCard(user),
|
||||
_buildAvatarCard(context, user),
|
||||
const SizedBox(height: 16),
|
||||
|
||||
// 信息列表
|
||||
_buildInfoCard(user),
|
||||
_buildInfoCard(context, user),
|
||||
const SizedBox(height: 16),
|
||||
|
||||
// 操作按钮
|
||||
@@ -60,15 +59,15 @@ class ProfileDetailPage extends StatelessWidget {
|
||||
}
|
||||
|
||||
/// 头像卡片
|
||||
Widget _buildAvatarCard(UserEntity user) {
|
||||
Widget _buildAvatarCard(BuildContext context, UserEntity user) {
|
||||
return Container(
|
||||
padding: const EdgeInsets.symmetric(vertical: 32),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
color: context.appColors.cardBackground,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: const Color(0x0D000000),
|
||||
color: context.appColors.cardShadow,
|
||||
blurRadius: 8,
|
||||
offset: const Offset(0, 2),
|
||||
),
|
||||
@@ -95,10 +94,10 @@ class ProfileDetailPage extends StatelessWidget {
|
||||
// 昵称
|
||||
Text(
|
||||
user.nickname,
|
||||
style: const TextStyle(
|
||||
style: TextStyle(
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Color(0xFF1D2129),
|
||||
color: context.appColors.textPrimary,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
@@ -107,7 +106,7 @@ class ProfileDetailPage extends StatelessWidget {
|
||||
'@${user.username}',
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: const Color(0xFF86909C),
|
||||
color: context.appColors.textTertiary,
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -142,14 +141,14 @@ class ProfileDetailPage extends StatelessWidget {
|
||||
}
|
||||
|
||||
/// 信息卡片
|
||||
Widget _buildInfoCard(UserEntity user) {
|
||||
Widget _buildInfoCard(BuildContext context, UserEntity user) {
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
color: context.appColors.cardBackground,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: const Color(0x0D000000),
|
||||
color: context.appColors.cardShadow,
|
||||
blurRadius: 8,
|
||||
offset: const Offset(0, 2),
|
||||
),
|
||||
@@ -158,18 +157,21 @@ class ProfileDetailPage extends StatelessWidget {
|
||||
child: Column(
|
||||
children: [
|
||||
_buildInfoItem(
|
||||
context,
|
||||
icon: Icons.person_outline,
|
||||
label: '用户ID',
|
||||
value: user.userId,
|
||||
showDivider: true,
|
||||
),
|
||||
_buildInfoItem(
|
||||
context,
|
||||
icon: Icons.account_circle_outlined,
|
||||
label: '用户名',
|
||||
value: user.username,
|
||||
showDivider: true,
|
||||
),
|
||||
_buildInfoItem(
|
||||
context,
|
||||
icon: Icons.badge_outlined,
|
||||
label: '昵称',
|
||||
value: user.nickname,
|
||||
@@ -177,6 +179,7 @@ class ProfileDetailPage extends StatelessWidget {
|
||||
),
|
||||
if (user.email != null)
|
||||
_buildInfoItem(
|
||||
context,
|
||||
icon: Icons.email_outlined,
|
||||
label: '邮箱',
|
||||
value: user.email!,
|
||||
@@ -184,6 +187,7 @@ class ProfileDetailPage extends StatelessWidget {
|
||||
),
|
||||
if (user.phone != null)
|
||||
_buildInfoItem(
|
||||
context,
|
||||
icon: Icons.phone_outlined,
|
||||
label: '手机号',
|
||||
value: user.phone!,
|
||||
@@ -195,7 +199,8 @@ class ProfileDetailPage extends StatelessWidget {
|
||||
}
|
||||
|
||||
/// 信息项
|
||||
Widget _buildInfoItem({
|
||||
Widget _buildInfoItem(
|
||||
BuildContext context, {
|
||||
required IconData icon,
|
||||
required String label,
|
||||
required String value,
|
||||
@@ -207,13 +212,13 @@ class ProfileDetailPage extends StatelessWidget {
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 14),
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(icon, size: 22, color: const Color(0xFF86909C)),
|
||||
Icon(icon, size: 22, color: context.appColors.textTertiary),
|
||||
const SizedBox(width: 12),
|
||||
Text(
|
||||
label,
|
||||
style: const TextStyle(
|
||||
style: TextStyle(
|
||||
fontSize: 15,
|
||||
color: Color(0xFF86909C),
|
||||
color: context.appColors.textTertiary,
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
@@ -221,9 +226,9 @@ class ProfileDetailPage extends StatelessWidget {
|
||||
flex: 2,
|
||||
child: Text(
|
||||
value,
|
||||
style: const TextStyle(
|
||||
style: TextStyle(
|
||||
fontSize: 15,
|
||||
color: Color(0xFF1D2129),
|
||||
color: context.appColors.textPrimary,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
textAlign: TextAlign.right,
|
||||
@@ -237,7 +242,7 @@ class ProfileDetailPage extends StatelessWidget {
|
||||
Divider(
|
||||
height: 1,
|
||||
thickness: 1,
|
||||
color: const Color(0xFFF2F3F5),
|
||||
color: context.appColors.divider,
|
||||
),
|
||||
],
|
||||
);
|
||||
|
||||
@@ -5,6 +5,7 @@ import 'package:go_router/go_router.dart';
|
||||
import 'package:maibu_satabot_v2/core/localization/app_localizations.dart';
|
||||
import 'package:maibu_satabot_v2/core/localization/locale_cubit.dart';
|
||||
import 'package:maibu_satabot_v2/core/router/route_paths.dart';
|
||||
import 'package:maibu_satabot_v2/core/theme/AppTheme.dart';
|
||||
import 'package:maibu_satabot_v2/core/storage/user_storage.dart';
|
||||
import 'package:maibu_satabot_v2/features/auth/presentation/bloc/auth_cubit.dart';
|
||||
import 'package:maibu_satabot_v2/features/main_container/presentation/cubit/tab_config_cubit.dart';
|
||||
@@ -22,20 +23,19 @@ class _SystemSettingsPageState extends State<SystemSettingsPage> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: const Color(0xFFF5F6F8),
|
||||
backgroundColor: context.appColors.pageBackground,
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.white,
|
||||
elevation: 0,
|
||||
leading: IconButton(
|
||||
icon: const Icon(Icons.arrow_back, color: Color(0xFF1D2129)),
|
||||
icon: Icon(Icons.arrow_back, color: context.appColors.textPrimary),
|
||||
onPressed: () => Navigator.pop(context),
|
||||
),
|
||||
title: Text(
|
||||
AppLocalizations.of(context).translate('my.settings'),
|
||||
style: const TextStyle(
|
||||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Color(0xFF1D2129),
|
||||
color: context.appColors.textPrimary,
|
||||
),
|
||||
),
|
||||
centerTitle: true,
|
||||
@@ -65,11 +65,11 @@ class _SystemSettingsPageState extends State<SystemSettingsPage> {
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(16),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
color: context.appColors.cardBackground,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
boxShadow: const [
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Color(0x0D000000),
|
||||
color: context.appColors.cardShadow,
|
||||
blurRadius: 8,
|
||||
offset: Offset(0, 2),
|
||||
),
|
||||
@@ -83,10 +83,10 @@ class _SystemSettingsPageState extends State<SystemSettingsPage> {
|
||||
children: [
|
||||
Text(
|
||||
AppLocalizations.of(context).translate('my_v2.suspend_bar'),
|
||||
style: const TextStyle(
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Color(0xFF1D2129),
|
||||
color: context.appColors.textPrimary,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
@@ -94,9 +94,9 @@ class _SystemSettingsPageState extends State<SystemSettingsPage> {
|
||||
AppLocalizations.of(
|
||||
context,
|
||||
).translate('my_v2.suspend_bar_desc'),
|
||||
style: const TextStyle(
|
||||
style: TextStyle(
|
||||
fontSize: 13,
|
||||
color: Color(0xFF86909C),
|
||||
color: context.appColors.textTertiary,
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -124,11 +124,11 @@ class _SystemSettingsPageState extends State<SystemSettingsPage> {
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(16),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
color: context.appColors.cardBackground,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
boxShadow: const [
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Color(0x0D000000),
|
||||
color: context.appColors.cardShadow,
|
||||
blurRadius: 8,
|
||||
offset: Offset(0, 2),
|
||||
),
|
||||
@@ -139,10 +139,10 @@ class _SystemSettingsPageState extends State<SystemSettingsPage> {
|
||||
children: [
|
||||
Text(
|
||||
AppLocalizations.of(context).translate('my_v2.tab_settings'),
|
||||
style: const TextStyle(
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Color(0xFF1D2129),
|
||||
color: context.appColors.textPrimary,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
@@ -167,9 +167,9 @@ class _SystemSettingsPageState extends State<SystemSettingsPage> {
|
||||
Expanded(
|
||||
child: Text(
|
||||
tab.name,
|
||||
style: const TextStyle(
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: Color(0xFF1D2129),
|
||||
color: context.appColors.textPrimary,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -197,11 +197,11 @@ class _SystemSettingsPageState extends State<SystemSettingsPage> {
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(16),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
color: context.appColors.cardBackground,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
boxShadow: const [
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Color(0x0D000000),
|
||||
color: context.appColors.cardShadow,
|
||||
blurRadius: 8,
|
||||
offset: Offset(0, 2),
|
||||
),
|
||||
@@ -212,10 +212,10 @@ class _SystemSettingsPageState extends State<SystemSettingsPage> {
|
||||
children: [
|
||||
Text(
|
||||
AppLocalizations.of(context).translate('my.language'),
|
||||
style: const TextStyle(
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Color(0xFF1D2129),
|
||||
color: context.appColors.textPrimary,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
@@ -267,7 +267,7 @@ class _SystemSettingsPageState extends State<SystemSettingsPage> {
|
||||
border: Border.all(
|
||||
color: isSelected
|
||||
? const Color(0xFF165DFF)
|
||||
: const Color(0xFFE5E6EB),
|
||||
: context.appColors.divider,
|
||||
width: 1,
|
||||
),
|
||||
),
|
||||
@@ -280,7 +280,7 @@ class _SystemSettingsPageState extends State<SystemSettingsPage> {
|
||||
fontSize: 14,
|
||||
color: isSelected
|
||||
? const Color(0xFF165DFF)
|
||||
: const Color(0xFF1D2129),
|
||||
: context.appColors.textPrimary,
|
||||
fontWeight: isSelected ? FontWeight.w600 : FontWeight.normal,
|
||||
),
|
||||
),
|
||||
@@ -306,11 +306,11 @@ class _SystemSettingsPageState extends State<SystemSettingsPage> {
|
||||
child: Container(
|
||||
padding: const EdgeInsets.symmetric(vertical: 16),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
color: context.appColors.cardBackground,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
boxShadow: const [
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Color(0x0D000000),
|
||||
color: context.appColors.cardShadow,
|
||||
blurRadius: 8,
|
||||
offset: Offset(0, 2),
|
||||
),
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:maibu_satabot_v2/core/localization/app_localizations.dart';
|
||||
import 'package:maibu_satabot_v2/core/theme/AppTheme.dart';
|
||||
import 'package:maibu_satabot_v2/features/v2/my/domain/entities/my_entities.dart';
|
||||
|
||||
/// 菜单项卡片组件(100% 还原设计稿)
|
||||
@@ -32,17 +33,17 @@ class MenuItemCard extends StatelessWidget {
|
||||
Icon(
|
||||
_getIconData(item.icon),
|
||||
size: 20,
|
||||
color: const Color(0xFF4E5969),
|
||||
color: context.appColors.textSecondary,
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
// 标题
|
||||
Expanded(
|
||||
child: Text(
|
||||
_getLocalizedTitle(context, item),
|
||||
style: const TextStyle(
|
||||
style: TextStyle(
|
||||
fontSize: 15,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Color(0xFF1D2129),
|
||||
color: context.appColors.textPrimary,
|
||||
),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
@@ -53,9 +54,9 @@ class MenuItemCard extends StatelessWidget {
|
||||
Flexible(
|
||||
child: Text(
|
||||
item.subTitle!,
|
||||
style: const TextStyle(
|
||||
style: TextStyle(
|
||||
fontSize: 13,
|
||||
color: Color(0xFF86909C),
|
||||
color: context.appColors.textTertiary,
|
||||
),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
@@ -73,14 +74,14 @@ class MenuItemCard extends StatelessWidget {
|
||||
activeTrackColor: const Color(
|
||||
0xFF165DFF,
|
||||
).withOpacity(0.3),
|
||||
inactiveThumbColor: const Color(0xFFC9CDD4),
|
||||
inactiveTrackColor: const Color(0xFFE5E6EB),
|
||||
inactiveThumbColor: context.appColors.textTertiary,
|
||||
inactiveTrackColor: context.appColors.divider,
|
||||
),
|
||||
),
|
||||
],
|
||||
Icon(
|
||||
Icons.chevron_right,
|
||||
color: const Color(0xFFC9CDD4),
|
||||
color: context.appColors.textTertiary,
|
||||
size: 20,
|
||||
),
|
||||
],
|
||||
@@ -94,7 +95,7 @@ class MenuItemCard extends StatelessWidget {
|
||||
child: Divider(
|
||||
height: 1,
|
||||
thickness: 0.5,
|
||||
color: const Color(0xFFF0F0F0),
|
||||
color: context.appColors.divider,
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:maibu_satabot_v2/core/localization/app_localizations.dart';
|
||||
import 'package:maibu_satabot_v2/core/theme/AppTheme.dart';
|
||||
import 'package:maibu_satabot_v2/features/v2/my/presentation/constants/my_constants.dart';
|
||||
|
||||
/// 快捷入口卡片组件(我的消息、我的收藏、我的工单)
|
||||
@@ -21,11 +22,11 @@ class QuickActionCard extends StatelessWidget {
|
||||
margin: const EdgeInsets.symmetric(horizontal: 16),
|
||||
padding: const EdgeInsets.symmetric(vertical: 20),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
color: context.appColors.cardBackground,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: const Color(0x0D000000),
|
||||
color: context.appColors.cardShadow,
|
||||
blurRadius: 10,
|
||||
offset: const Offset(0, 2),
|
||||
),
|
||||
@@ -36,23 +37,26 @@ class QuickActionCard extends StatelessWidget {
|
||||
children: [
|
||||
// 我的消息
|
||||
_buildQuickActionItem(
|
||||
context,
|
||||
icon: Icons.notifications_outlined,
|
||||
label: AppLocalizations.of(context).translate('my_v2.message'),
|
||||
onTap: onMessageTap,
|
||||
showBadge: true,
|
||||
),
|
||||
// 分割线
|
||||
Container(width: 1, height: 40, color: const Color(0xFFF0F0F0)),
|
||||
Container(width: 1, height: 40, color: context.appColors.divider),
|
||||
// 我的收藏
|
||||
_buildQuickActionItem(
|
||||
context,
|
||||
icon: Icons.favorite_border,
|
||||
label: AppLocalizations.of(context).translate('my_v2.favorite'),
|
||||
onTap: onFavoriteTap,
|
||||
),
|
||||
// 分割线
|
||||
Container(width: 1, height: 40, color: const Color(0xFFF0F0F0)),
|
||||
Container(width: 1, height: 40, color: context.appColors.divider),
|
||||
// 我的工单
|
||||
_buildQuickActionItem(
|
||||
context,
|
||||
icon: Icons.assignment_outlined,
|
||||
label: AppLocalizations.of(context).translate('my_v2.work_order'),
|
||||
onTap: onWorkOrderTap,
|
||||
@@ -62,7 +66,8 @@ class QuickActionCard extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildQuickActionItem({
|
||||
Widget _buildQuickActionItem(
|
||||
BuildContext context, {
|
||||
required IconData icon,
|
||||
required String label,
|
||||
required VoidCallback onTap,
|
||||
@@ -98,9 +103,9 @@ class QuickActionCard extends StatelessWidget {
|
||||
const SizedBox(height: 8),
|
||||
Text(
|
||||
label,
|
||||
style: const TextStyle(
|
||||
style: TextStyle(
|
||||
fontSize: 13,
|
||||
color: MyColors.textSecondary,
|
||||
color: context.appColors.textSecondary,
|
||||
),
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
|
||||
Reference in New Issue
Block a user