新版UI-登录页面-我的页面(简单适配)-设备的部分(无设备的+有设备)
This commit is contained in:
@@ -35,6 +35,7 @@ import 'drone_station_detail_page.dart';
|
||||
import '../../../../../core/network/mqtt/data/datasources/drone_osd_datasource.dart';
|
||||
import 'qr_scanner_page.dart';
|
||||
import 'bind_device_page.dart';
|
||||
import 'no_device_page_v2.dart';
|
||||
import '../../../local_camera/presentation/pages/local_camera_page.dart';
|
||||
import '../../../usb_camera/presentation/pages/usb_camera_page.dart';
|
||||
import '../../../../remote_control/presentation/bloc/remote_control_cubit.dart';
|
||||
@@ -190,50 +191,70 @@ class _DeviceStatusViewState extends State<DeviceStatusView> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final isDark = Theme.of(context).brightness == Brightness.dark;
|
||||
// 无设备时整页是固定浅色渐变(与我的页 V2 同款),状态栏图标须恒为深色;
|
||||
// 若跟随深色主题给白色图标,会消失在浅蓝背景上。
|
||||
final isNoDevice = _isNoDeviceState(
|
||||
context.watch<DeviceListBloc.DeviceStatusBloc>().state,
|
||||
);
|
||||
return AnnotatedRegion<SystemUiOverlayStyle>(
|
||||
value: SystemUiOverlayStyle(
|
||||
statusBarColor: Colors.transparent,
|
||||
statusBarIconBrightness: isDark ? Brightness.light : Brightness.dark,
|
||||
statusBarIconBrightness: isNoDevice
|
||||
? Brightness.dark
|
||||
: (Theme.of(context).brightness == Brightness.dark
|
||||
? Brightness.light
|
||||
: Brightness.dark),
|
||||
),
|
||||
child: Scaffold(
|
||||
backgroundColor: context.appColors.pageBackground,
|
||||
body: SafeArea(
|
||||
child:
|
||||
BlocConsumer<
|
||||
DeviceListBloc.DeviceStatusBloc,
|
||||
DeviceListState.DeviceStatusState
|
||||
>(
|
||||
listener: (context, state) {
|
||||
// 🔥 监听错误状态,显示友好提示
|
||||
if (state is DeviceListState.DeviceStatusError &&
|
||||
state.shouldShowError) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text(state.message),
|
||||
duration: const Duration(seconds: 2),
|
||||
behavior: SnackBarBehavior.floating,
|
||||
backgroundColor: context.appColors.warning,
|
||||
),
|
||||
);
|
||||
}
|
||||
},
|
||||
builder: (context, state) {
|
||||
return Column(
|
||||
children: [
|
||||
_buildAppBar(context),
|
||||
_buildSearchBar(context),
|
||||
_buildTypeFilterBar(context),
|
||||
Expanded(child: _buildContent(context, state)),
|
||||
],
|
||||
);
|
||||
},
|
||||
// SafeArea 下移到常规列表分支:无设备页渐变需铺进状态栏(与我的页一致)
|
||||
body: BlocConsumer<
|
||||
DeviceListBloc.DeviceStatusBloc,
|
||||
DeviceListState.DeviceStatusState
|
||||
>(
|
||||
listener: (context, state) {
|
||||
// 🔥 监听错误状态,显示友好提示
|
||||
if (state is DeviceListState.DeviceStatusError &&
|
||||
state.shouldShowError) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text(state.message),
|
||||
duration: const Duration(seconds: 2),
|
||||
behavior: SnackBarBehavior.floating,
|
||||
backgroundColor: context.appColors.warning,
|
||||
),
|
||||
);
|
||||
}
|
||||
},
|
||||
builder: (context, state) {
|
||||
// 无设备:该场站设备接口返回空时,整页(含顶栏)切换到
|
||||
// 「01_无设备首页」设计稿页面;逻辑链保持 场站→siteId→设备列表 不变。
|
||||
if (_isNoDeviceState(state)) {
|
||||
return const NoDevicePageV2();
|
||||
}
|
||||
return SafeArea(
|
||||
child: Column(
|
||||
children: [
|
||||
_buildAppBar(context),
|
||||
_buildSearchBar(context),
|
||||
_buildTypeFilterBar(context),
|
||||
Expanded(child: _buildContent(context, state)),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/// 无设备判据:「全部」标签下设备接口返回空
|
||||
bool _isNoDeviceState(DeviceListState.DeviceStatusState state) {
|
||||
return state is DeviceListState.DeviceStatusLoaded &&
|
||||
state.selectedType == 'all' &&
|
||||
state.devices.isEmpty;
|
||||
}
|
||||
|
||||
Widget _buildAppBar(BuildContext context) {
|
||||
// 🔥 个人角色(roleKey == 'personal')隐藏场站选择器
|
||||
final roleKey = context.watch<AppUserCubit>().state.user?.roleKey;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,575 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:get_it/get_it.dart';
|
||||
import 'package:maibu_satabot_v2/components/capsule_toast.dart';
|
||||
import 'package:maibu_satabot_v2/core/app/app_user_cubit.dart';
|
||||
import 'package:maibu_satabot_v2/features/main_container/domain/tab_config.dart';
|
||||
import 'package:maibu_satabot_v2/features/v2/local_camera/presentation/pages/local_camera_page.dart';
|
||||
import 'package:maibu_satabot_v2/features/v2/site/presentation/cubit/site_cubit.dart';
|
||||
import 'package:maibu_satabot_v2/features/v2/usb_camera/presentation/pages/usb_camera_page.dart';
|
||||
import '../bloc/device_status_bloc.dart';
|
||||
import '../bloc/device_status_event.dart';
|
||||
import 'bind_device_page.dart';
|
||||
import 'qr_scanner_page.dart';
|
||||
|
||||
/// 无设备首页 —— 按「01_无设备首页」设计稿实现。
|
||||
///
|
||||
/// 触发条件(逻辑链不变):SiteCubit 取所有场站 → 第一个场站拉设备列表 →
|
||||
/// DeviceStatusLoaded 且 devices 为空时,由 DeviceStatusView 整页切换到本页。
|
||||
///
|
||||
/// 说明:
|
||||
/// - 顶栏按设计稿换新:SATA logo + 铃铛/⊕ 白底按钮;
|
||||
/// - 右上角按钮下方小字「(场站名)」为切换场站入口,个人角色追加「个人账号」说明;
|
||||
/// - 「添加机器人」与卡片蓝色 ⊕ 均弹出底部添加弹窗,内部各项保持原跳转;
|
||||
/// - 「新手入门」三条二级内容未开发,统一 Toast 提示;
|
||||
/// - 背景用设计稿地图背景切图 shebei_bg.png,车图为透明底 shebei-logo.png,
|
||||
/// 车与背景分层不粘连。
|
||||
class NoDevicePageV2 extends StatelessWidget {
|
||||
const NoDevicePageV2({super.key});
|
||||
|
||||
// ===== 固定视觉配色(与登录页/我的页 V2 同系) =====
|
||||
static const _bgTop = Color(0xFFFAFCFF);
|
||||
static const _navy = Color(0xFF1A2B4A);
|
||||
static const _grayText = Color(0xFF86909C);
|
||||
static const _primaryBlue = Color(0xFF1C96F6);
|
||||
static const _cardBorder = Color(0xFFE9F1FA);
|
||||
static const _btnGradient = LinearGradient(
|
||||
begin: Alignment.centerLeft,
|
||||
end: Alignment.centerRight,
|
||||
colors: [Color(0xFF2BAFFE), Color(0xFF1C96F6), Color(0xFF0B7DEE)],
|
||||
stops: [0.0, 0.5, 1.0],
|
||||
);
|
||||
|
||||
static void _todoTap() {
|
||||
CapsuleToast.show('功能暂未开发', showCheck: false);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: _bgTop,
|
||||
body: Stack(
|
||||
fit: StackFit.expand,
|
||||
children: [
|
||||
// 背景:设计稿地图背景切图,顶对齐裁切(替代此前手绘三层渐变)
|
||||
Positioned.fill(
|
||||
child: Image.asset(
|
||||
'assets/images/shebei_bg.png',
|
||||
fit: BoxFit.cover,
|
||||
alignment: Alignment.topCenter,
|
||||
),
|
||||
),
|
||||
SafeArea(
|
||||
bottom: false,
|
||||
child: SingleChildScrollView(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const SizedBox(height: 8),
|
||||
_buildTopBar(context),
|
||||
_buildSiteEntry(context),
|
||||
const SizedBox(height: 18),
|
||||
_buildHeroCard(context),
|
||||
const SizedBox(height: 26),
|
||||
const Center(
|
||||
child: Text(
|
||||
'还没有添加机器人',
|
||||
style: TextStyle(
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: _navy,
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
const Center(
|
||||
child: Text(
|
||||
'您可以先了解 APP 的功能,\n收到机器人后随时绑定使用。',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 13,
|
||||
color: _grayText,
|
||||
height: 1.6,
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
_buildAddButton(context),
|
||||
const SizedBox(height: 30),
|
||||
const Text(
|
||||
'新手入门',
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: _navy,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
_buildGuideCard(
|
||||
icon: Icons.list_alt,
|
||||
title: '产品操作指南',
|
||||
subtitle: '了解机器人基础功能和使用流程',
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
_buildGuideCard(
|
||||
icon: Icons.videocam_outlined,
|
||||
title: '观看产品视频',
|
||||
subtitle: '快速上手遥控、图传及作业功能',
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
_buildGuideCard(
|
||||
icon: Icons.help_outline,
|
||||
title: '帮助与售后服务',
|
||||
subtitle: '常见问题、报修及客服支持',
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
// ===== 顶栏:logo + 铃铛/⊕(设计稿新样式) =====
|
||||
Widget _buildTopBar(BuildContext context) {
|
||||
return Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Image.asset(
|
||||
'assets/images/me_left_logo.png',
|
||||
height: 44,
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
_buildTopIconButton(Icons.notifications_none, onTap: _todoTap),
|
||||
const SizedBox(width: 10),
|
||||
// 设计稿:右上角 ⊕ 是蓝底白号主色按钮,与铃铛的白底按钮区分
|
||||
_buildTopIconButton(
|
||||
Icons.add,
|
||||
onTap: () => _showAddSheet(context),
|
||||
primary: true,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildTopIconButton(
|
||||
IconData icon, {
|
||||
required VoidCallback onTap,
|
||||
bool primary = false,
|
||||
}) {
|
||||
return GestureDetector(
|
||||
onTap: onTap,
|
||||
child: Container(
|
||||
width: 44,
|
||||
height: 44,
|
||||
decoration: BoxDecoration(
|
||||
color: primary ? null : Colors.white,
|
||||
gradient: primary ? _btnGradient : null,
|
||||
borderRadius: BorderRadius.circular(14),
|
||||
border: primary ? null : Border.all(color: _cardBorder),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: primary
|
||||
? _primaryBlue.withValues(alpha: 0.3)
|
||||
: _primaryBlue.withValues(alpha: 0.05),
|
||||
blurRadius: primary ? 10 : 8,
|
||||
offset: const Offset(0, 2),
|
||||
),
|
||||
],
|
||||
),
|
||||
child: Icon(
|
||||
icon,
|
||||
size: 22,
|
||||
color: primary ? Colors.white : _navy,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
// ===== 切换场站入口:右上角按钮下方小字(场站名) =====
|
||||
Widget _buildSiteEntry(BuildContext context) {
|
||||
final isPersonal =
|
||||
context.watch<AppUserCubit>().state.user?.roleKey ==
|
||||
TabConfig.personalRoleKey;
|
||||
return BlocBuilder<SiteCubit, SiteState>(
|
||||
bloc: GetIt.I<SiteCubit>(),
|
||||
builder: (context, siteState) {
|
||||
final name = siteState.selectedSite?.siteName ?? '未选择场站';
|
||||
return Align(
|
||||
alignment: Alignment.centerRight,
|
||||
child: GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: () => _onSiteTap(context, siteState, isPersonal),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(top: 6, right: 4, bottom: 4),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text(
|
||||
isPersonal ? '($name)· 个人账号' : '($name)',
|
||||
style: const TextStyle(fontSize: 12, color: _grayText),
|
||||
),
|
||||
if (!isPersonal)
|
||||
const Icon(
|
||||
Icons.keyboard_arrow_down,
|
||||
size: 16,
|
||||
color: _grayText,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
void _onSiteTap(BuildContext context, SiteState siteState, bool isPersonal) {
|
||||
if (isPersonal) {
|
||||
CapsuleToast.show('个人账号仅绑定一个场站', showCheck: false);
|
||||
return;
|
||||
}
|
||||
if (siteState.sites.isEmpty) {
|
||||
CapsuleToast.show('暂无场站数据', showCheck: false);
|
||||
return;
|
||||
}
|
||||
final siteCubit = GetIt.I<SiteCubit>();
|
||||
showModalBottomSheet(
|
||||
context: context,
|
||||
backgroundColor: Colors.white,
|
||||
shape: const RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.vertical(top: Radius.circular(16)),
|
||||
),
|
||||
builder: (sheetCtx) {
|
||||
return SafeArea(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
const Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 14),
|
||||
child: Center(
|
||||
child: Text(
|
||||
'选择场站',
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: _navy,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
const Divider(height: 1, color: Color(0xFFF0F4FA)),
|
||||
Flexible(
|
||||
child: ListView.builder(
|
||||
shrinkWrap: true,
|
||||
itemCount: siteState.sites.length,
|
||||
itemBuilder: (_, i) {
|
||||
final site = siteState.sites[i];
|
||||
final selected =
|
||||
siteCubit.state.selectedSite?.id == site.id;
|
||||
return ListTile(
|
||||
title: Text(
|
||||
site.siteName,
|
||||
style: TextStyle(
|
||||
fontSize: 15,
|
||||
fontWeight: selected
|
||||
? FontWeight.w600
|
||||
: FontWeight.w400,
|
||||
color: selected ? _primaryBlue : _navy,
|
||||
),
|
||||
),
|
||||
trailing: selected
|
||||
? const Icon(
|
||||
Icons.check,
|
||||
size: 20,
|
||||
color: _primaryBlue,
|
||||
)
|
||||
: null,
|
||||
onTap: () {
|
||||
// 选中后 SiteCubit 流会触发设备列表重拉;
|
||||
// 若新场站有设备,本页会自动退回正常列表。
|
||||
siteCubit.selectSite(site);
|
||||
Navigator.pop(sheetCtx);
|
||||
},
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
// ===== Hero 卡:透明底车图 + 右上角蓝色 ⊕ =====
|
||||
Widget _buildHeroCard(BuildContext context) {
|
||||
return Container(
|
||||
height: 230,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white.withValues(alpha: 0.72),
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
border: Border.all(color: _cardBorder),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: _primaryBlue.withValues(alpha: 0.06),
|
||||
blurRadius: 16,
|
||||
offset: const Offset(0, 4),
|
||||
),
|
||||
],
|
||||
),
|
||||
child: Stack(
|
||||
children: [
|
||||
Positioned.fill(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(20),
|
||||
child: Image.asset(
|
||||
'assets/images/shebei-logo.png',
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
top: 14,
|
||||
right: 14,
|
||||
child: GestureDetector(
|
||||
onTap: () => _showAddSheet(context),
|
||||
child: Container(
|
||||
width: 40,
|
||||
height: 40,
|
||||
decoration: const BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
gradient: _btnGradient,
|
||||
),
|
||||
child: const Icon(Icons.add, color: Colors.white, size: 22),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
// ===== 添加机器人主按钮 =====
|
||||
Widget _buildAddButton(BuildContext context) {
|
||||
return GestureDetector(
|
||||
onTap: () => _showAddSheet(context),
|
||||
child: Container(
|
||||
height: 48,
|
||||
decoration: BoxDecoration(
|
||||
gradient: _btnGradient,
|
||||
borderRadius: BorderRadius.circular(14),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: _primaryBlue.withValues(alpha: 0.3),
|
||||
blurRadius: 12,
|
||||
offset: const Offset(0, 4),
|
||||
),
|
||||
],
|
||||
),
|
||||
child: const Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Icon(Icons.add, color: Colors.white, size: 20),
|
||||
SizedBox(width: 8),
|
||||
Text(
|
||||
'添加机器人',
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
// ===== 添加机器人底部弹窗:各项保持原跳转 =====
|
||||
void _showAddSheet(BuildContext context) {
|
||||
showModalBottomSheet(
|
||||
context: context,
|
||||
backgroundColor: Colors.white,
|
||||
shape: const RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.vertical(top: Radius.circular(16)),
|
||||
),
|
||||
builder: (sheetCtx) {
|
||||
return SafeArea(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.fromLTRB(16, 14, 8, 4),
|
||||
child: Row(
|
||||
children: [
|
||||
const Expanded(
|
||||
child: Center(
|
||||
child: Text(
|
||||
'添加机器人',
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: _navy,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
IconButton(
|
||||
icon: const Icon(
|
||||
Icons.close,
|
||||
size: 20,
|
||||
color: _grayText,
|
||||
),
|
||||
onPressed: () => Navigator.pop(sheetCtx),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
_sheetItem(
|
||||
icon: Icons.qr_code_scanner,
|
||||
label: '扫一扫',
|
||||
onTap: () async {
|
||||
Navigator.pop(sheetCtx);
|
||||
final result = await Navigator.of(context).push<String>(
|
||||
MaterialPageRoute(builder: (_) => const QrScannerPage()),
|
||||
);
|
||||
if (result != null && context.mounted) {
|
||||
await Navigator.of(context).push(
|
||||
MaterialPageRoute(
|
||||
builder: (_) => BindDevicePage(scanResult: result),
|
||||
),
|
||||
);
|
||||
// 绑定流程结束后重拉设备列表,有设备则自动退回正常列表页
|
||||
if (context.mounted) {
|
||||
context.read<DeviceStatusBloc>().add(
|
||||
const DeviceStatusRefresh(),
|
||||
);
|
||||
}
|
||||
}
|
||||
},
|
||||
),
|
||||
_sheetDivider(),
|
||||
_sheetItem(
|
||||
icon: Icons.add_circle_outline,
|
||||
label: '添加设备',
|
||||
onTap: () {
|
||||
Navigator.pop(sheetCtx);
|
||||
// 原菜单该项即为 TODO,保持不跳转
|
||||
_todoTap();
|
||||
},
|
||||
),
|
||||
_sheetDivider(),
|
||||
_sheetItem(
|
||||
icon: Icons.videocam_outlined,
|
||||
label: '本地视频',
|
||||
onTap: () {
|
||||
Navigator.pop(sheetCtx);
|
||||
Navigator.of(context).push(
|
||||
MaterialPageRoute(builder: (_) => const LocalCameraPage()),
|
||||
);
|
||||
},
|
||||
),
|
||||
_sheetDivider(),
|
||||
_sheetItem(
|
||||
icon: Icons.usb,
|
||||
label: 'USB 摄像头',
|
||||
onTap: () {
|
||||
Navigator.pop(sheetCtx);
|
||||
Navigator.of(context).push(
|
||||
MaterialPageRoute(builder: (_) => const UsbCameraPage()),
|
||||
);
|
||||
},
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Widget _sheetItem({
|
||||
required IconData icon,
|
||||
required String label,
|
||||
required VoidCallback onTap,
|
||||
}) {
|
||||
return InkWell(
|
||||
onTap: onTap,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 15),
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(icon, size: 20, color: _navy),
|
||||
const SizedBox(width: 12),
|
||||
Text(
|
||||
label,
|
||||
style: const TextStyle(fontSize: 15, color: _navy),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _sheetDivider() {
|
||||
return const Divider(height: 1, indent: 20, color: Color(0xFFF0F4FA));
|
||||
}
|
||||
|
||||
// ===== 新手入门卡片:二级未开发,统一提示 =====
|
||||
Widget _buildGuideCard({
|
||||
required IconData icon,
|
||||
required String title,
|
||||
required String subtitle,
|
||||
}) {
|
||||
return GestureDetector(
|
||||
onTap: _todoTap,
|
||||
child: Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 16),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(14),
|
||||
border: Border.all(color: _cardBorder),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(icon, size: 24, color: _primaryBlue),
|
||||
const SizedBox(width: 14),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
title,
|
||||
style: const TextStyle(
|
||||
fontSize: 15,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: _navy,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 3),
|
||||
Text(
|
||||
subtitle,
|
||||
style: const TextStyle(fontSize: 12, color: _grayText),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
const Icon(
|
||||
Icons.chevron_right,
|
||||
size: 20,
|
||||
color: Color(0xFFC9CDD4),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user