diff --git a/lib/ui/home/personal_draw.dart b/lib/ui/home/personal_draw.dart index 1e786c4..b60492c 100644 --- a/lib/ui/home/personal_draw.dart +++ b/lib/ui/home/personal_draw.dart @@ -1,6 +1,7 @@ import 'package:aku_community_manager/provider/user_provider.dart'; import 'package:aku_community_manager/style/app_style.dart'; import 'package:aku_community_manager/ui/settings/settings_page.dart'; +import 'package:aku_community_manager/ui/settings/user_info_page.dart'; import 'package:aku_ui/common_widgets/aku_button.dart'; import 'package:aku_ui/common_widgets/aku_round_button.dart'; import 'package:flutter/material.dart'; @@ -107,7 +108,13 @@ class _PersonalDrawState extends State { ], ), ), - _myListTile(Icons.contact_page, '个人信息'), + _myListTile( + Icons.contact_page, + '个人信息', + onPressed: () { + Get.to(UserInfoPage()); + }, + ), _myListTile(Icons.supervised_user_circle, '联系客服'), _myListTile(Icons.settings, '设置', onPressed: () { Get.to(SettingsPage()); diff --git a/lib/ui/settings/user_info_page.dart b/lib/ui/settings/user_info_page.dart new file mode 100644 index 0000000..fcb9e2e --- /dev/null +++ b/lib/ui/settings/user_info_page.dart @@ -0,0 +1,40 @@ +import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart'; +import 'package:aku_community_manager/ui/widgets/common/aku_tile.dart'; +import 'package:flutter/material.dart'; +import 'package:aku_community_manager/tools/screen_tool.dart'; +import 'package:get/get.dart'; + +class UserInfoPage extends StatefulWidget { + UserInfoPage({Key key}) : super(key: key); + + @override + _UserInfoPageState createState() => _UserInfoPageState(); +} + +class _UserInfoPageState extends State { + @override + Widget build(BuildContext context) { + return AkuScaffold( + title: '个人信息', + body: ListView( + padding: EdgeInsets.symmetric(vertical: 24.w), + children: [ + AkuTile( + onTap: () {}, + title: Text('头像'), + height: 168.w, + suffix: CircleAvatar(radius: 60.w), + ), + AkuTile( + onTap: () {}, + title: Text('昵称'), + ), + AkuTile( + onTap: () {}, + title: Text('手机'), + ), + ], + ), + ); + } +} diff --git a/lib/ui/widgets/common/aku_tile.dart b/lib/ui/widgets/common/aku_tile.dart index 23b9246..4570dc1 100644 --- a/lib/ui/widgets/common/aku_tile.dart +++ b/lib/ui/widgets/common/aku_tile.dart @@ -50,6 +50,9 @@ class _AkuTileState extends State { ), Spacer(), widget.suffix ?? SizedBox(), + widget.suffix != null && widget.arrow + ? SizedBox(width: 24.w) + : SizedBox(), widget.arrow ? Icon( Icons.arrow_forward_ios,