diff --git a/assets/images/profile.png b/assets/images/profile.png new file mode 100644 index 0000000..05498b3 Binary files /dev/null and b/assets/images/profile.png differ diff --git a/lib/app/features/enterprise/presentation/controllers/enterprise_list_controller.dart b/lib/app/features/enterprise/presentation/controllers/enterprise_list_controller.dart index 6fa2d98..31a0e06 100644 --- a/lib/app/features/enterprise/presentation/controllers/enterprise_list_controller.dart +++ b/lib/app/features/enterprise/presentation/controllers/enterprise_list_controller.dart @@ -127,7 +127,15 @@ class EnterpriseListController extends GetxController { /// 导航到上传页面 Future navigateToUploadPage() async { - final result = await Get.toNamed(AppRoutes.test); + // final result = await Get.toNamed(AppRoutes.test); + // if (result == true) { + // refreshList(); // 调用控制器的方法刷新 + // } + } + + /// 导航到企业问题列表 + Future navigateToEnterpriseInfoPage() async { + final result = await Get.toNamed(AppRoutes.enterpriseInfo); if (result == true) { refreshList(); // 调用控制器的方法刷新 } diff --git a/lib/app/features/enterprise/presentation/views/enterprise_form_page.dart b/lib/app/features/enterprise/presentation/pages/enterprise_form_page.dart similarity index 84% rename from lib/app/features/enterprise/presentation/views/enterprise_form_page.dart rename to lib/app/features/enterprise/presentation/pages/enterprise_form_page.dart index 7805d92..cab79d6 100644 --- a/lib/app/features/enterprise/presentation/views/enterprise_form_page.dart +++ b/lib/app/features/enterprise/presentation/pages/enterprise_form_page.dart @@ -21,8 +21,9 @@ class EnterpriseFormPage extends GetView { padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 12.h), child: Column( children: [ + buildTitleSection(title: '必填信息'), + SizedBox(height: 12.h), _buildInfoSection( - title: '必填信息', children: [ _buildTextField( label: '企业名称', @@ -38,8 +39,9 @@ class EnterpriseFormPage extends GetView { ], ), SizedBox(height: 12.h), + buildTitleSection(title: '选填信息'), + SizedBox(height: 12.h), _buildInfoSection( - title: '选填信息', children: [ _buildTextField( label: '企业地址', @@ -78,36 +80,57 @@ class EnterpriseFormPage extends GetView { // 将 controller 传进来以获取动态标题 PreferredSizeWidget _buildAppBar() { - return PreferredSize( - preferredSize: Size.fromHeight(56.h), - child: Container( - decoration: const BoxDecoration( - // ... 渐变色 + return AppBar( + // ... 其他 AppBar 属性 + // 使用 Obx 来监听 pageTitle 的变化 + title: Obx( + () => Text( + controller.pageTitle.value, + style: TextStyle( + fontSize: 18.sp, + color: Colors.white, + fontWeight: FontWeight.bold, + ), ), - child: AppBar( - // ... 其他 AppBar 属性 - // 使用 Obx 来监听 pageTitle 的变化 - title: Obx( - () => Text( - controller.pageTitle.value, - style: TextStyle( - fontSize: 18.sp, - color: Colors.white, - fontWeight: FontWeight.bold, - ), - ), + ), + leading: IconButton( + icon: Icon( + Icons.arrow_back_ios_new_rounded, + size: 24.sp, + color: Colors.white, + ), + onPressed: () => Get.back(), + ), + backgroundColor: Colors.transparent, + flexibleSpace: Container( + decoration: const BoxDecoration( + gradient: LinearGradient( + colors: [Color(0xFF418CFC), Color(0xFF3DBFFC)], + begin: Alignment.centerLeft, + end: Alignment.centerRight, ), - centerTitle: true, ), ), + elevation: 0, + centerTitle: true, + ); + } + + Widget buildTitleSection({required String title}) { + return Row( + children: [ + Container(width: 4.w, height: 16.h, color: Colors.blue), + SizedBox(width: 8.w), + Text( + title, + style: TextStyle(fontSize: 16.sp, fontWeight: FontWeight.bold), + ), + ], ); } // 构建信息区块 (例如 "必填信息") - Widget _buildInfoSection({ - required String title, - required List children, - }) { + Widget _buildInfoSection({required List children}) { return Container( padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 12.h), decoration: BoxDecoration( @@ -116,20 +139,7 @@ class EnterpriseFormPage extends GetView { ), child: Column( crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - children: [ - Container(width: 4.w, height: 16.h, color: Colors.blue), - SizedBox(width: 8.w), - Text( - title, - style: TextStyle(fontSize: 16.sp, fontWeight: FontWeight.bold), - ), - ], - ), - SizedBox(height: 10.h), - ...children, - ], + children: [...children], ), ); } diff --git a/lib/app/features/enterprise/presentation/pages/enterprise_info_page.dart b/lib/app/features/enterprise/presentation/pages/enterprise_info_page.dart new file mode 100644 index 0000000..1cabaf6 --- /dev/null +++ b/lib/app/features/enterprise/presentation/pages/enterprise_info_page.dart @@ -0,0 +1,88 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:get/get.dart'; + +// 支付宝消息页面 +class EnterpriseInfoPage extends StatelessWidget { + const EnterpriseInfoPage({super.key}); + + @override + Widget build(BuildContext context) { + // 1. 使用 DefaultTabController 包裹 Scaffold + // length: 2 表示我们有两个 Tab + return DefaultTabController( + length: 2, + child: Scaffold( + backgroundColor: const Color(0xFFF5F5F5), // 设置一个类似截图的浅灰色背景 + // 使用我们自定义的 AppBar + appBar: _buildAlipayAppBar(context), + // TabBarView 用于显示与 Tab 对应的内容 + body: const TabBarView( + children: [ + Center(child: Text('问题列表')), + Center(child: Text('企业基本信息')), + ], + ), + ), + ); + } + + /// 构建 AppBar 的私有方法 + PreferredSizeWidget _buildAlipayAppBar(BuildContext context) { + return AppBar( + // --- 样式和颜色 --- + backgroundColor: Colors.transparent, // AppBar 背景色为白色 + flexibleSpace: Container( + decoration: const BoxDecoration( + gradient: LinearGradient( + colors: [Color(0xFF418CFC), Color(0xFF3DBFFC)], + begin: Alignment.centerLeft, + end: Alignment.centerRight, + ), + ), + ), + elevation: 0, // 移除 AppBar 的阴影 + systemOverlayStyle: SystemUiOverlayStyle.dark, // 设置状态栏图标为深色 + // --- 左侧返回按钮 --- + leading: IconButton( + icon: const Icon(Icons.arrow_back_ios, color: Colors.white, size: 20), + onPressed: () { + Get.back(); + }, + ), + // --- 中间的 TabBar --- + // 将 TabBar 放入 title 属性中,可以使其居中显示 + title: TabBar( + isScrollable: false, // true: Tab的宽度由内容决定; false: 均分宽度 + labelColor: Colors.white, // 选中 Tab 的文字颜色 + unselectedLabelColor: Colors.grey, // 未选中 Tab 的文字颜色 + // labelStyle: const TextStyle(fontSize: 17, fontWeight: FontWeight.bold), + // unselectedLabelStyle: const TextStyle(fontSize: 17), + overlayColor: WidgetStateProperty.all(Colors.transparent), + indicatorColor: Colors.white, // 指示器颜色 + // indicatorWeight: 2.5, // 指示器高度 + indicatorPadding: EdgeInsetsGeometry.only(bottom: 4.h), // 指示器内边距), + indicatorSize: TabBarIndicatorSize.label, // 指示器宽度与文字同宽 + dividerHeight: 0, // 去掉 TabBar 底部的分割线 + tabs: const [ + Tab(text: '问题列表'), + Tab(text: '企业基本情况'), + ], + ), + centerTitle: false, + titleSpacing: 0, + // --- 右侧操作按钮 --- + actions: [ + IconButton( + icon: Icon(Icons.add, color: Colors.white), // 使用 .sp + onPressed: () {}, + ), + IconButton( + icon: Icon(Icons.upload, color: Colors.pink[300]), // 使用 .sp + onPressed: () {}, + ), + ], + ); + } +} diff --git a/lib/app/features/enterprise/presentation/views/enterprise_list_page.dart b/lib/app/features/enterprise/presentation/pages/enterprise_list_page.dart similarity index 88% rename from lib/app/features/enterprise/presentation/views/enterprise_list_page.dart rename to lib/app/features/enterprise/presentation/pages/enterprise_list_page.dart index 6cd819f..7406bf8 100644 --- a/lib/app/features/enterprise/presentation/views/enterprise_list_page.dart +++ b/lib/app/features/enterprise/presentation/pages/enterprise_list_page.dart @@ -20,7 +20,16 @@ class EnterpriseListPage extends GetView { color: Colors.white, ), ), - backgroundColor: const Color(0xFF3B82F6), + backgroundColor: Colors.transparent, + flexibleSpace: Container( + decoration: const BoxDecoration( + gradient: LinearGradient( + colors: [Color(0xFF418CFC), Color(0xFF3DBFFC)], + begin: Alignment.centerLeft, + end: Alignment.centerRight, + ), + ), + ), elevation: 0, centerTitle: true, actions: [ @@ -65,7 +74,9 @@ class EnterpriseListPage extends GetView { onEdit: () { controller.navigateToEditForm(enterprise); }, - onViewProblems: () {}, + onViewProblems: () { + controller.navigateToEnterpriseInfoPage(); + }, ), ); }, diff --git a/lib/app/routes/app_pages.dart b/lib/app/routes/app_pages.dart index 32a235a..9232850 100644 --- a/lib/app/routes/app_pages.dart +++ b/lib/app/routes/app_pages.dart @@ -1,6 +1,6 @@ import 'package:get/get.dart'; import 'package:problem_check_system/app/features/enterprise/presentation/bindings/enterprise_form_binding.dart'; -import 'package:problem_check_system/app/features/enterprise/presentation/views/enterprise_form_page.dart'; +import 'package:problem_check_system/app/features/enterprise/presentation/pages/enterprise_form_page.dart'; import 'package:problem_check_system/modules/home/bindings/home_binding.dart'; import 'package:problem_check_system/modules/home/views/home_page.dart'; import 'package:problem_check_system/modules/auth/bindings/login_binding.dart'; @@ -10,7 +10,7 @@ import 'package:problem_check_system/modules/my/views/change_password.dart'; import 'package:problem_check_system/modules/problem/bindings/problem_form_binding.dart'; import 'package:problem_check_system/modules/problem/views/problem_form_page.dart'; import 'package:problem_check_system/modules/problem/views/problem_upload_page.dart'; -import 'package:problem_check_system/modules/test.dart'; +import 'package:problem_check_system/app/features/enterprise/presentation/pages/enterprise_info_page.dart'; import 'app_routes.dart'; @@ -42,7 +42,10 @@ abstract class AppPages { page: () => const ProblemFormPage(), binding: ProblemFormBinding(), ), - GetPage(name: AppRoutes.test, page: () => const HealthApp()), + GetPage( + name: AppRoutes.enterpriseInfo, + page: () => const EnterpriseInfoPage(), + ), GetPage( name: AppRoutes.enterpriseForm, page: () => const EnterpriseFormPage(), diff --git a/lib/app/routes/app_routes.dart b/lib/app/routes/app_routes.dart index f59aa77..a023f20 100644 --- a/lib/app/routes/app_routes.dart +++ b/lib/app/routes/app_routes.dart @@ -13,10 +13,8 @@ abstract class AppRoutes { // #endregion // #region - static const enterprise = '/enterprise'; + static const enterpriseInfo = '/enterpriseInfo'; static const enterpriseList = '/enterpriseList'; static const enterpriseForm = '/enterpriseForm'; // #endregion - - static const test = '/test'; } diff --git a/lib/modules/home/controllers/home_controller.dart b/lib/modules/home/controllers/home_controller.dart index 6acb4dd..6608501 100644 --- a/lib/modules/home/controllers/home_controller.dart +++ b/lib/modules/home/controllers/home_controller.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; import 'package:get/get.dart'; -import 'package:problem_check_system/app/features/enterprise/presentation/views/enterprise_list_page.dart'; +import 'package:problem_check_system/app/features/enterprise/presentation/pages/enterprise_list_page.dart'; import 'package:problem_check_system/modules/my/views/my_page.dart'; import 'package:problem_check_system/modules/problem/views/problem_page.dart'; diff --git a/lib/modules/my/views/my_page.dart b/lib/modules/my/views/my_page.dart index 0b6b9ad..575703b 100644 --- a/lib/modules/my/views/my_page.dart +++ b/lib/modules/my/views/my_page.dart @@ -40,18 +40,13 @@ class MyPage extends GetView { /// 顶部背景和用户信息部分 Widget _buildBackground() { - return Positioned( - top: 0, - left: 0, - right: 0, - child: Container( - height: 250.h, - decoration: BoxDecoration( - gradient: LinearGradient( - begin: Alignment.topCenter, - end: Alignment.bottomCenter, - colors: [const Color(0xFF418CFC), const Color(0x713DBFFC)], - ), + return Container( + decoration: const BoxDecoration( + image: DecorationImage( + // 替换成你的图片路径 + image: AssetImage('assets/images/profile.png'), + // 4. 使用 BoxFit.cover 填充模式 + fit: BoxFit.cover, ), ), ); @@ -83,10 +78,10 @@ class MyPage extends GetView { padding: EdgeInsets.symmetric(horizontal: 20.w), decoration: BoxDecoration( color: Colors.white, - borderRadius: BorderRadius.circular(15.r), + borderRadius: BorderRadius.circular(10.r), boxShadow: [ BoxShadow( - color: Colors.grey.withValues(alpha: 25.5), + color: Colors.grey.withValues(alpha: .5), spreadRadius: 2, blurRadius: 5, offset: const Offset(0, 3), @@ -158,7 +153,10 @@ class MyPage extends GetView { ), Text( controller.userPhone.value, - style: TextStyle(fontSize: 14.sp, color: Colors.grey), + style: TextStyle( + fontSize: 14.sp, + color: const Color(0xFF408EFC), + ), ), ], ), diff --git a/lib/modules/test.dart b/lib/modules/test.dart deleted file mode 100644 index d2f5f88..0000000 --- a/lib/modules/test.dart +++ /dev/null @@ -1,468 +0,0 @@ -import 'package:flutter/material.dart'; - -class HealthApp extends StatelessWidget { - const HealthApp({super.key}); - - @override - Widget build(BuildContext context) { - return HomePage1(); - } -} - -class HomePage1 extends StatefulWidget { - const HomePage1({super.key}); - - @override - State createState() => _HomePageState(); -} - -class _HomePageState extends State - with SingleTickerProviderStateMixin { - late TabController _tabController; - int _bottomNavIndex = 0; - - @override - void initState() { - super.initState(); - _tabController = TabController(length: 3, vsync: this); - } - - @override - void dispose() { - _tabController.dispose(); - super.dispose(); - } - - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: _buildAppBar(), - body: SingleChildScrollView( - child: Column( - children: [ - // _buildSearchBar(), - // _buildServicesGrid(), - const SizedBox(height: 12), - // _buildHealthManagementCard(), - const SizedBox(height: 12), - // _buildDoctorBanner(), - const SizedBox(height: 12), - // _buildPopularServices(), - ], - ), - ), - // bottomNavigationBar: _buildBottomNavigationBar(), - ); - } - - // 构建顶部 AppBar - PreferredSizeWidget _buildAppBar() { - return AppBar( - backgroundColor: Colors.blue, - elevation: 0, - leading: SizedBox(), - title: const Center( - child: Text( - '企业列表', - style: TextStyle( - color: Colors.white, - fontWeight: FontWeight.bold, - fontFamily: 'MyFont', - ), - ), - ), - actions: [ - // IconButton( - // onPressed: () {}, - // icon: const Icon(Icons.widgets_outlined, color: Colors.black), - // ), - IconButton( - onPressed: () {}, - icon: const Icon(Icons.add, color: Colors.white), - ), - ], - bottom: TabBar( - controller: _tabController, - isScrollable: true, - labelColor: Colors.black, - unselectedLabelColor: Colors.grey[700], - indicatorColor: Colors.blue, - indicatorWeight: 3, - tabs: const [ - Tab(text: '问题列表'), - Tab(text: '历史问题列表'), - Tab(text: '企业基本情况'), - ], - ), - ); - } - - // 构建顶部 AppBar - PreferredSizeWidget _buildAppBar2() { - return AppBar( - backgroundColor: Colors.lightBlue[50], - elevation: 0, - leading: const Icon(Icons.arrow_back_ios, color: Colors.black), - title: const Center( - child: Text( - '企业列表', - style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold), - ), - ), - actions: [ - // IconButton( - // onPressed: () {}, - // icon: const Icon(Icons.widgets_outlined, color: Colors.black), - // ), - IconButton( - onPressed: () {}, - icon: const Icon(Icons.add, color: Colors.black), - ), - ], - bottom: TabBar( - controller: _tabController, - isScrollable: true, - labelColor: Colors.black, - unselectedLabelColor: Colors.grey[700], - indicatorColor: Colors.blue, - indicatorWeight: 3, - tabs: const [ - Tab(text: '问题列表'), - Tab(text: '历史问题列表'), - Tab(text: '企业基本情况'), - ], - ), - ); - } - - // 构建搜索框 - Widget _buildSearchBar() { - return Container( - padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8), - color: Colors.lightBlue[50], - child: Row( - children: [ - const Text('淄博', style: TextStyle(fontSize: 16)), - const Icon(Icons.arrow_drop_down), - const SizedBox(width: 8), - Expanded( - child: Container( - height: 40, - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(20), - ), - child: const TextField( - decoration: InputDecoration( - hintText: '家庭共济', - prefixIcon: Icon(Icons.search, color: Colors.grey), - border: InputBorder.none, - contentPadding: EdgeInsets.symmetric(vertical: 10), - ), - ), - ), - ), - TextButton( - onPressed: () {}, - child: const Text( - '搜索', - style: TextStyle(color: Colors.black, fontSize: 16), - ), - ), - ], - ), - ); - } - - // 构建功能网格 - Widget _buildServicesGrid() { - // 辅助函数创建单个网格项 - Widget buildGridItem( - IconData icon, - String label, { - bool isSpecial = false, - }) { - return Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Stack( - alignment: Alignment.topRight, - children: [ - Icon(icon, size: 40, color: Colors.blue), - if (isSpecial) - Container( - padding: const EdgeInsets.symmetric( - horizontal: 4, - vertical: 1, - ), - decoration: BoxDecoration( - color: Colors.red, - borderRadius: BorderRadius.circular(8), - ), - child: const Text( - '正品药', - style: TextStyle(color: Colors.white, fontSize: 8), - ), - ), - ], - ), - const SizedBox(height: 8), - Text(label, style: const TextStyle(fontSize: 12)), - ], - ); - } - - return Container( - color: Colors.lightBlue[50], - padding: const EdgeInsets.fromLTRB(16, 16, 16, 24), - child: GridView.count( - crossAxisCount: 5, - shrinkWrap: true, - physics: const NeverScrollableScrollPhysics(), - children: [ - buildGridItem(Icons.qr_code_scanner, '医保码'), - buildGridItem(Icons.add_box, '挂号'), - buildGridItem(Icons.person, '问诊'), - buildGridItem(Icons.medical_services, '买药', isSpecial: true), - buildGridItem(Icons.shield, '健康保障'), - buildGridItem(Icons.local_hospital, '好药源选'), - buildGridItem(Icons.health_and_safety, '体检'), - buildGridItem(Icons.mood, '口腔'), - buildGridItem(Icons.grass, '中医'), - buildGridItem(Icons.apps, '全部服务'), - ], - ), - ); - } - - // 构建健康管理卡片 - Widget _buildHealthManagementCard() { - return Container( - margin: const EdgeInsets.symmetric(horizontal: 16), - padding: const EdgeInsets.all(16), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(12), - ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - const Text( - '我的健康管理', - style: TextStyle(fontWeight: FontWeight.bold, fontSize: 16), - ), - const SizedBox(height: 12), - Container( - padding: const EdgeInsets.all(12), - decoration: BoxDecoration( - color: Colors.blue.withOpacity(0.1), - borderRadius: BorderRadius.circular(8), - ), - child: Row( - children: [ - const Icon(Icons.warning_amber_rounded, color: Colors.orange), - const SizedBox(width: 8), - const Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - '你的补充医保待激活', - style: TextStyle(fontWeight: FontWeight.bold), - ), - Text( - '√ 医保内外都能报 √ 带病投保首选', - style: TextStyle(color: Colors.grey, fontSize: 12), - ), - ], - ), - ), - ElevatedButton( - onPressed: () {}, - style: ElevatedButton.styleFrom( - backgroundColor: Colors.orange, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(18.0), - ), - ), - child: const Text('去激活'), - ), - ], - ), - ), - ], - ), - ); - } - - // 构建医生问诊横幅 - Widget _buildDoctorBanner() { - return Container( - margin: const EdgeInsets.symmetric(horizontal: 16), - padding: const EdgeInsets.all(16), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(12), - image: const DecorationImage( - // 模拟医生背景图 - image: NetworkImage( - 'https://img.tukuppt.com/png_preview/00/34/83/8fT4fFFaLg.jpg!/fw/780', - ), // 使用一个示例医生图片 URL - fit: BoxFit.cover, - alignment: Alignment.centerRight, - opacity: 0.8, - ), - ), - child: const Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - '三甲医生快速问诊', - style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold), - ), - SizedBox(height: 4), - Text('100%公立医生 不限制问诊次数', style: TextStyle(color: Colors.grey)), - ], - ), - // 医生图片通过 DecorationImage 实现 - ], - ), - ); - } - - // 构建热门服务部分 - Widget _buildPopularServices() { - return Container( - margin: const EdgeInsets.symmetric(horizontal: 16), - padding: const EdgeInsets.all(16), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(12), - ), - child: Column( - children: [ - const Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text( - '热门服务', - style: TextStyle(fontWeight: FontWeight.bold, fontSize: 16), - ), - Text('专病专科', style: TextStyle(color: Colors.grey)), - Text('健康百科', style: TextStyle(color: Colors.grey)), - Row( - children: [ - Text('更多', style: TextStyle(color: Colors.grey)), - Icon(Icons.arrow_forward_ios, size: 12, color: Colors.grey), - ], - ), - ], - ), - const SizedBox(height: 16), - Row( - children: [ - _buildServiceCard( - '百万医疗险', - '600万医疗保障', - Icons.add_to_photos, - Colors.blue, - ), - const SizedBox(width: 12), - _buildServiceCard( - '百万住院保障', - '医保内外都可报', - Icons.security, - Colors.cyan, - ), - ], - ), - const SizedBox(height: 12), - Row( - children: [ - _buildServiceCard( - '医保种牙', - '种植牙方案科普', - Icons.mood, - Colors.lightBlue, - ), - const SizedBox(width: 12), - _buildServiceCard( - '我的家', - '家人健康我守护', - Icons.home, - Colors.purpleAccent, - ), - ], - ), - ], - ), - ); - } - - // 服务卡片的小组件 - Widget _buildServiceCard( - String title, - String subtitle, - IconData icon, - Color color, - ) { - return Expanded( - child: Container( - padding: const EdgeInsets.all(12), - decoration: BoxDecoration( - color: color.withOpacity(0.1), - borderRadius: BorderRadius.circular(8), - ), - child: Row( - children: [ - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - title, - style: const TextStyle(fontWeight: FontWeight.bold), - ), - const SizedBox(height: 4), - Text( - subtitle, - style: const TextStyle(fontSize: 12, color: Colors.grey), - ), - ], - ), - ), - Icon(icon, color: color, size: 30), - ], - ), - ), - ); - } - - // 构建底部导航栏 - Widget _buildBottomNavigationBar() { - return BottomNavigationBar( - currentIndex: _bottomNavIndex, - onTap: (index) { - setState(() { - _bottomNavIndex = index; - }); - }, - type: BottomNavigationBarType.fixed, - selectedItemColor: Colors.blue, - unselectedItemColor: Colors.grey, - items: const [ - BottomNavigationBarItem(icon: Icon(Icons.home), label: '企业'), - BottomNavigationBarItem( - icon: Icon(Icons.card_membership), - label: '全部问题', - ), - // BottomNavigationBarItem(icon: Icon(Icons.waves), label: 'AQ-健康管家'), - // BottomNavigationBarItem(icon: Icon(Icons.add_moderator), label: '医疗保障'), - BottomNavigationBarItem(icon: Icon(Icons.person_outline), label: '我的'), - ], - ); - } -}