diff --git a/assets/home/ic_Patrol.png b/assets/home/ic_Patrol.png new file mode 100644 index 0000000..7af20d3 Binary files /dev/null and b/assets/home/ic_Patrol.png differ diff --git a/assets/home/ic_activity.png b/assets/home/ic_activity.png new file mode 100644 index 0000000..1bc8449 Binary files /dev/null and b/assets/home/ic_activity.png differ diff --git a/assets/home/ic_all.png b/assets/home/ic_all.png new file mode 100644 index 0000000..084e444 Binary files /dev/null and b/assets/home/ic_all.png differ diff --git a/assets/home/ic_article.png b/assets/home/ic_article.png new file mode 100644 index 0000000..e8c8969 Binary files /dev/null and b/assets/home/ic_article.png differ diff --git a/assets/home/ic_borrow.png b/assets/home/ic_borrow.png new file mode 100644 index 0000000..7d5aa8f Binary files /dev/null and b/assets/home/ic_borrow.png differ diff --git a/assets/home/ic_decoration.png b/assets/home/ic_decoration.png new file mode 100644 index 0000000..0276af1 Binary files /dev/null and b/assets/home/ic_decoration.png differ diff --git a/assets/home/ic_greening.png b/assets/home/ic_greening.png new file mode 100644 index 0000000..c0a4482 Binary files /dev/null and b/assets/home/ic_greening.png differ diff --git a/assets/home/ic_police.png b/assets/home/ic_police.png new file mode 100644 index 0000000..6dbca93 Binary files /dev/null and b/assets/home/ic_police.png differ diff --git a/assets/home/ic_service.png b/assets/home/ic_service.png new file mode 100644 index 0000000..99a3b6b Binary files /dev/null and b/assets/home/ic_service.png differ diff --git a/assets/home/ic_visitors.png b/assets/home/ic_visitors.png new file mode 100644 index 0000000..907d853 Binary files /dev/null and b/assets/home/ic_visitors.png differ diff --git a/lib/ui/home/application/applications_page.dart b/lib/ui/home/application/applications_page.dart index ce4f2bb..93e8eff 100644 --- a/lib/ui/home/application/applications_page.dart +++ b/lib/ui/home/application/applications_page.dart @@ -37,13 +37,14 @@ class _ApplicationPageState extends State int _nowSelectedIndex = 0; List _recommandApplications = [ - AppApplication('活动管理', '', ActivityManagerPage()), - AppApplication('访客管理', '', Scaffold()), + AppApplication( + '活动管理', R.ASSETS_HOME_IC_ACTIVITY_PNG, ActivityManagerPage()), + AppApplication('访客管理', R.ASSETS_HOME_IC_VISITORS_PNG, Scaffold()), AppApplication('便民电话', '', Scaffold()), - AppApplication('借还管理', '', Scaffold()), + AppApplication('借还管理', R.ASSETS_HOME_IC_BORROW_PNG, Scaffold()), AppApplication('工单管理', '', Scaffold()), AppApplication('语音管家', '', Scaffold()), - AppApplication('一键报警', '', Scaffold()), + AppApplication('一键报警', R.ASSETS_HOME_IC_POLICE_PNG, Scaffold()), AppApplication('问卷调查', '', Scaffold()), ]; @@ -245,10 +246,10 @@ class _ApplicationPageState extends State child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ - SizedBox( - height: 75.w, - width: 75.w, - child: Placeholder(), + Image.asset( + application.assetPath, + height: 72.w, + width: 72.w, ), AkuBox.h(8), Text(application.name), diff --git a/lib/ui/home/home_page.dart b/lib/ui/home/home_page.dart index 46294d6..ba48d6f 100644 --- a/lib/ui/home/home_page.dart +++ b/lib/ui/home/home_page.dart @@ -24,7 +24,7 @@ class HomePage extends StatefulWidget { class _HomePageState extends State { //自定义bar的菜单按钮 - Widget _menuButton(IconData iconData, String text, Widget page) { + Widget _menuButton(String assetPath, String text, Widget page) { return Expanded( child: AkuButton( radius: 8.w, @@ -35,9 +35,10 @@ class _HomePageState extends State { child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ - Icon( - iconData, - size: 75.w, + Image.asset( + assetPath, + height: 75.w, + width: 75.w, ), SizedBox(height: 8.w), Text( @@ -274,11 +275,14 @@ class _HomePageState extends State { child: Row( mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ - _menuButton(Icons.wysiwyg, '一键报警', HomePage()), - _menuButton(Icons.work, '访客管理', HomePage()), - _menuButton(Icons.accessibility, '报事报修', HomePage()), _menuButton( - Icons.account_balance, '全部应用', ApplicationPage()), + R.ASSETS_HOME_IC_POLICE_PNG, '一键报警', HomePage()), + _menuButton( + R.ASSETS_HOME_IC_VISITORS_PNG, '访客管理', HomePage()), + _menuButton( + R.ASSETS_HOME_IC_SERVICE_PNG, '报事报修', HomePage()), + _menuButton( + R.ASSETS_HOME_IC_ALL_PNG, '全部应用', ApplicationPage()), ], ), ),