diff --git a/README.md b/README.md index 447971f..dac408b 100644 --- a/README.md +++ b/README.md @@ -4,13 +4,4 @@ A new Flutter application. ## Getting Started -This project is a starting point for a Flutter application. - -A few resources to get you started if this is your first Flutter project: - -- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) -- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) - -For help getting started with Flutter, view our -[online documentation](https://flutter.dev/docs), which offers tutorials, -samples, guidance on mobile development, and a full API reference. +### 使用`fgen`生成图片 diff --git a/assets/home/ic_news.png b/assets/home/ic_news.png new file mode 100644 index 0000000..2709f12 Binary files /dev/null and b/assets/home/ic_news.png differ diff --git a/assets/home/ic_scan.png b/assets/home/ic_scan.png new file mode 100644 index 0000000..5d2937c Binary files /dev/null and b/assets/home/ic_scan.png differ diff --git a/assets/home/ic_search.png b/assets/home/ic_search.png new file mode 100644 index 0000000..91ec233 Binary files /dev/null and b/assets/home/ic_search.png differ diff --git a/lib/ui/home/home_page.dart b/lib/ui/home/home_page.dart index 556021e..5106ce3 100644 --- a/lib/ui/home/home_page.dart +++ b/lib/ui/home/home_page.dart @@ -1,3 +1,4 @@ +import 'package:aku_community_manager/const/resource.dart'; import 'package:aku_community_manager/provider/user_provider.dart'; import 'package:aku_community_manager/style/app_style.dart'; import 'package:aku_community_manager/tools/screen_tool.dart'; @@ -186,9 +187,10 @@ class _HomePageState extends State { Get.to(ScanPage()); }, child: Column(children: [ - Icon( - Icons.access_alarm, - size: 48.w, + Image.asset( + R.ASSETS_HOME_IC_SCAN_PNG, + height: 48.w, + width: 48.w, ), Text( '扫一扫', @@ -209,9 +211,10 @@ class _HomePageState extends State { height: double.infinity, onPressed: () {}, child: Column(children: [ - Icon( - Icons.access_time, - size: 48.w, + Image.asset( + R.ASSETS_HOME_IC_NEWS_PNG, + height: 48.w, + width: 48.w, ), Text( '消息', diff --git a/pubspec.yaml b/pubspec.yaml index 92a0519..7f7063b 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -63,6 +63,9 @@ flutter: # included with your application, so that you can use the icons in # the material Icons class. uses-material-design: true + assets: + - assets/ + - assets/home/ # To add assets to your application, add an assets section, like this: # assets: # - images/a_dot_burr.jpeg