分离头像组件

重构应用组
pull/1/head
张萌 3 years ago
parent 4c3ea957f6
commit 201e7d1eca

Binary file not shown.

After

Width:  |  Height:  |  Size: 998 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

@ -13,7 +13,6 @@ import 'package:aku_new_community/pages/goods_manage_page/select_borrow_return_p
import 'package:aku_new_community/pages/house_introduce/house_introduce.dart';
import 'package:aku_new_community/pages/industry_committee/industry_committee_page.dart';
import 'package:aku_new_community/pages/life_pay/life_pay_page_new.dart';
import 'package:aku_new_community/pages/one_alarm/widget/alarm_page.dart';
import 'package:aku_new_community/pages/opening_code_page/opening_code_page.dart';
import 'package:aku_new_community/pages/renovation_manage/new_renovation/new_renovation_page.dart';
import 'package:aku_new_community/pages/service_browse/service_browse_page.dart';
@ -27,24 +26,24 @@ import 'package:aku_new_community/ui/function_and_service/task/task_page.dart';
import 'package:aku_new_community/ui/function_and_service/work_order/work_order_page.dart';
import 'package:aku_new_community/ui/home/application/all_application.dart';
import 'package:aku_new_community/ui/manager/advice/advice_page.dart';
import 'package:aku_new_community/ui/manager/house_keeping/house_keeping_page.dart';
import 'package:aku_new_community/ui/manager/questionnaire/questionnaire_page.dart';
import 'package:aku_new_community/ui/profile/car/car_manage_page.dart';
import 'package:aku_new_community/ui/profile/car_parking/car_parking_page.dart';
import 'package:aku_new_community/ui/profile/house/house_owners_page.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
///
///Application Object
class AO {
String title = '';
String path = '';
dynamic page = () => Scaffold();
VoidCallback? callback = () {};
AO(
this.title,
this.path,
this.page,
this.callback,
);
AO.fromRaw(String raw, {String? replaceTitle}) {
@ -52,7 +51,7 @@ class AO {
if (element.title == raw) {
this.title = replaceTitle ?? element.title;
this.path = element.path;
this.page = element.page;
this.callback = element.callback;
}
});
}
@ -72,41 +71,54 @@ class AO {
List<AO> appObjects = [
// if (false) AO('一键开门', R.ASSETS_APPLICATIONS_OEPN_DOOR_PNG, () => Scaffold()),
AO('开门码', R.ASSETS_ICONS_FUNC_KMM_PNG, () => OpeningCodePage()),
AO('访客邀请', R.ASSETS_ICONS_FUNC_FKYQ_PNG, () => VisitorAccessPage()),
AO('报事报修', Assets.home.icBsbx.path, () => WorkOrderPage()),
AO('生活缴费', Assets.home.icShjf.path, () => LifePayPageNew()),
AO('业委会', R.ASSETS_ICONS_FUNC_YWH_PNG, () => IndustryCommitteePage()),
AO('建议咨询', R.ASSETS_ICONS_FUNC_JYZX_PNG,
() => AdvicePage(type: AdviceType.SUGGESTION)),
AO('便民电话', R.ASSETS_ICONS_FUNC_BMDH_PNG, () => ConvenientPhonePage()),
AO('活动投票', R.ASSETS_ICONS_FUNC_HDTP_PNG, () => EventVotingPage()),
AO('物品出门', R.ASSETS_ICONS_FUNC_WPCH_PNG, () => GoodsDetoPage()),
AO('投诉表扬', R.ASSETS_ICONS_FUNC_TSBY_PNG,
() => AdvicePage(type: AdviceType.COMPLAIN)),
AO('问卷调查', R.ASSETS_ICONS_FUNC_WJDC_PNG, () => QuestionnairePage()),
AO('装修管理', R.ASSETS_ICONS_FUNC_ZXGL_PNG, () => NewRenovationPage()),
AO('借还管理', R.ASSETS_ICONS_FUNC_JHGL_PNG, () => SelectBorrowReturnPage()),
AO('一键报警', R.ASSETS_ICONS_FUNC_YJBJ_PNG, () => AlarmPage()),
AO('开门码', Assets.newIcon.icKmm.path, () => Get.to(() => OpeningCodePage())),
// AO('访客邀请', R.ASSETS_ICONS_FUNC_FKYQ_PNG, () => Get.to(()=>VisitorAccessPage()),
AO('报事报修', Assets.home.icBsbx.path, () => Get.to(() => WorkOrderPage())),
AO('生活缴费', Assets.home.icShjf.path, () => Get.to(() => LifePayPageNew())),
AO('业委会', Assets.newIcon.icYwh.path,
() => Get.to(() => IndustryCommitteePage())),
// AO('建议咨询', R.ASSETS_ICONS_FUNC_JYZX_PNG,
// () => AdvicePage(type: AdviceType.SUGGESTION)),
AO('便民电话', Assets.newIcon.imgBmdh.path,
() => Get.to(() => ConvenientPhonePage())),
AO('活动投票', Assets.newIcon.icHdtp.path, () => Get.to(() => EventVotingPage())),
AO('物品出门', Assets.newIcon.imgWpcm.path, () => Get.to(() => GoodsDetoPage())),
AO('投诉表扬', Assets.newIcon.icTsby.path,
() => Get.to(() => AdvicePage(type: AdviceType.COMPLAIN))),
AO('问卷调查', Assets.newIcon.icWjdc.path,
() => Get.to(() => QuestionnairePage())),
AO('装修管理', Assets.newIcon.imgZxgl.path,
() => Get.to(() => NewRenovationPage())),
AO('借还管理', Assets.newIcon.icJhgl.path,
() => Get.to(SelectBorrowReturnPage())),
// AO('一键报警', Assets.newIcon.yj, () => AlarmPage()),
AO('设施预约', Assets.home.icSsyy.path, () => FacilityAppointmentPage()),
AO('快递包裹', R.ASSETS_ICONS_FUNC_KDBG_PNG, () => ExpressPackagePage()),
AO('电子商务', R.ASSETS_ICONS_FUNC_DZSW_PNG, () => ElectronicCommercPage()),
AO('服务浏览', R.ASSETS_ICONS_FUNC_FWLL_PNG, () => ServiceBrowsePage()),
AO('社区介绍', R.ASSETS_ICONS_FUNC_SQJS_PNG, () => CommunityIntroducePage()),
AO('家政服务', R.ASSETS_ICONS_FUNC_JZFW_PNG, () => HouseKeepingPage()),
AO('快递包裹', Assets.newIcon.icKdbg.path,
() => Get.to(() => ExpressPackagePage())),
AO('电子商务', Assets.newIcon.icDzsw.path,
() => Get.to(() => ElectronicCommercPage())),
AO('服务浏览', Assets.newIcon.icFwll.path,
() => Get.to(() => ServiceBrowsePage())),
AO('社区介绍', Assets.newIcon.icSqjs.path,
() => Get.to(() => CommunityIntroducePage())),
// AO('家政服务', R.ASSETS_ICONS_FUNC_JZFW_PNG, () => HouseKeepingPage()),
AO('地理信息', R.ASSETS_ICONS_FUNC_DLXX_PNG, () => GeographicInformationPage()),
AO('周边企业', R.ASSETS_ICONS_FUNC_ZBQY_PNG, () => SurroundingEnterprisesPage()),
AO('住房说明', R.ASSETS_ICONS_FUNC_ZFSM_PNG, () => HouseIntroducePage()),
AO('智慧养老', Assets.home.icZhyl.path, () => OldAgeSupportPageSimple()),
AO('地理信息', Assets.newIcon.icDlxx.path,
() => Get.to(() => GeographicInformationPage())),
AO('周边企业', Assets.newIcon.icZbqy.path,
() => Get.to(() => SurroundingEnterprisesPage())),
AO('住房说明', Assets.newIcon.icRwsm.path,
() => Get.to(() => HouseIntroducePage())),
AO('智慧养老', Assets.home.icZhyl.path,
() => Get.to(() => OldAgeSupportPageSimple())),
AO('周边服务', Assets.home.icZbfw.path, null),
AO('任务发布', Assets.home.icRwfb.path, () => TaskPage()),
AO('任务发布', Assets.home.icRwfb.path, () => Get.to(() => TaskPage())),
AO('自营商城', Assets.icons.shoppingMall.path, null),
AO('邻家宠物', Assets.home.icLjcw.path, null),
AO('共享停车', Assets.icons.sharePark.path, null),
AO('二手市场', Assets.icons.secondHandMarket.path, null),
AO('共享投屏', Assets.icons.projectionScreen.path, null),
AO('全部应用', Assets.home.icQbyy.path, () => AllApplicationPage()),
AO('全部应用', Assets.home.icQbyy.path, () => Get.to(() => AllApplicationPage())),
// AO(
// '小区教育',
@ -159,9 +171,7 @@ AO allApp =
///线 original value
List<String> _recommendApp = [
'访客邀请',
'业委会',
'建议咨询',
'便民电话',
'活动投票',
'物品出门',
@ -193,7 +203,6 @@ List<String> _smartManagerApp = [
'开门码',
'报事报修',
'生活缴费',
'一键报警',
'任务发布',
];

@ -363,6 +363,10 @@ class $AssetsIconsGen {
AssetGenImage get identify =>
const AssetGenImage('assets/icons/identify.png');
AssetGenImage get imgAdd => const AssetGenImage('assets/icons/img_add.png');
AssetGenImage get imgQiandao =>
const AssetGenImage('assets/icons/img_qiandao.png');
AssetGenImage get imgShezhi =>
const AssetGenImage('assets/icons/img_shezhi.png');
AssetGenImage get intergral =>
const AssetGenImage('assets/icons/intergral.png');
AssetGenImage get introduce =>
@ -630,6 +634,38 @@ class $AssetsJsonGen {
const $AssetsJsonGen();
}
class $AssetsNewIconGen {
const $AssetsNewIconGen();
AssetGenImage get avatarPlaceholder =>
const AssetGenImage('assets/newIcon/avatar_placeholder.png');
AssetGenImage get icDlxx => const AssetGenImage('assets/newIcon/ic_dlxx.png');
AssetGenImage get icDzsw => const AssetGenImage('assets/newIcon/ic_dzsw.png');
AssetGenImage get icEssc => const AssetGenImage('assets/newIcon/ic_essc.png');
AssetGenImage get icFwll => const AssetGenImage('assets/newIcon/ic_fwll.png');
AssetGenImage get icGxtc => const AssetGenImage('assets/newIcon/ic_gxtc.png');
AssetGenImage get icGxtp => const AssetGenImage('assets/newIcon/ic_gxtp.png');
AssetGenImage get icHdtp => const AssetGenImage('assets/newIcon/ic_hdtp.png');
AssetGenImage get icJhgl => const AssetGenImage('assets/newIcon/ic_jhgl.png');
AssetGenImage get icKdbg => const AssetGenImage('assets/newIcon/ic_kdbg.png');
AssetGenImage get icKmm => const AssetGenImage('assets/newIcon/ic_kmm.png');
AssetGenImage get icRwsm => const AssetGenImage('assets/newIcon/ic_rwsm.png');
AssetGenImage get icSqjs => const AssetGenImage('assets/newIcon/ic_sqjs.png');
AssetGenImage get icTsby => const AssetGenImage('assets/newIcon/ic_tsby.png');
AssetGenImage get icWjdc => const AssetGenImage('assets/newIcon/ic_wjdc.png');
AssetGenImage get icXmfrw =>
const AssetGenImage('assets/newIcon/ic_xmfrw.png');
AssetGenImage get icYwh => const AssetGenImage('assets/newIcon/ic_ywh.png');
AssetGenImage get icZbqy => const AssetGenImage('assets/newIcon/ic_zbqy.png');
AssetGenImage get icZysc => const AssetGenImage('assets/newIcon/ic_zysc.png');
AssetGenImage get imgBmdh =>
const AssetGenImage('assets/newIcon/img_bmdh.png');
AssetGenImage get imgWpcm =>
const AssetGenImage('assets/newIcon/img_wpcm.png');
AssetGenImage get imgZxgl =>
const AssetGenImage('assets/newIcon/img_zxgl.png');
}
class $AssetsStaticGen {
const $AssetsStaticGen();
@ -688,6 +724,7 @@ class Assets {
static const $AssetsIconsGen icons = $AssetsIconsGen();
static const $AssetsImagesGen images = $AssetsImagesGen();
static const $AssetsJsonGen json = $AssetsJsonGen();
static const $AssetsNewIconGen newIcon = $AssetsNewIconGen();
static const $AssetsStaticGen static = $AssetsStaticGen();
static const $AssetsTabGen tab = $AssetsTabGen();
}

@ -559,11 +559,11 @@ class _HomePageState extends State<HomePage>
onTap: () {
if (LoginUtil.isNotLogin) return;
// if (!LoginUtil.haveRoom(ao.title)) return;
if (ao.page == null) {
if (ao.callback == null) {
BotToast.showText(
text: '该功能正在准备上线中,敬请期待', align: Alignment(0, 0.5));
} else {
Get.to(ao.page);
ao.callback!();
}
},
child: Column(

@ -11,7 +11,7 @@ import 'package:aku_new_community/ui/profile/new_house/my_family_page.dart';
import 'package:aku_new_community/ui/profile/new_house/my_house_page.dart';
import 'package:aku_new_community/utils/headers.dart';
import 'package:aku_new_community/utils/network/net_util.dart';
import 'package:aku_new_community/widget/beeImageNetwork.dart';
import 'package:aku_new_community/widget/bee_avatar_widget.dart';
import 'package:aku_new_community/widget/others/user_tool.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:flutter/cupertino.dart';
@ -133,14 +133,9 @@ class _PersonalIndexState extends State<PersonalIndex>
children: [
Hero(
tag: 'AVATAR',
child: ClipOval(
child: BeeImageNetwork(
width: 106.w,
height: 106.w,
imgs: UserTool.userProvider.userInfoModel
?.imgList ??
[],
),
child: BeeAvatarWidget(
imgs: UserTool
.userProvider.userInfoModel?.imgList,
),
),
Container(

@ -39,11 +39,11 @@ class _AllApplicationPageState extends State<AllApplicationPage> {
: () {
if (LoginUtil.isNotLogin) return;
if (!LoginUtil.haveRoom(object.title)) return;
if (object.page == null || !online) {
if (object.callback == null || !online) {
BotToast.showText(
text: '正在准备上线中,敬请期待', align: Alignment(0, 0.5));
} else {
Get.to(object.page);
object.callback!();
}
},
child: Column(

@ -13,6 +13,7 @@ import 'package:aku_new_community/utils/login_util.dart';
import 'package:aku_new_community/utils/network/base_model.dart';
import 'package:aku_new_community/utils/network/net_util.dart';
import 'package:aku_new_community/widget/bee_back_button.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:get/get.dart';
@ -77,7 +78,11 @@ class _BeeSearchState extends State<BeeSearch> {
onPressed: () {
if (LoginUtil.isNotLogin) return;
if (!LoginUtil.haveRoom(e.title)) return;
Get.to(e.page);
if (e.callback == null) {
BotToast.showText(text: '该功能正在准备上线中,敬请期待', align: Alignment(0, 0.5));
} else {
e.callback!();
}
},
shape: StadiumBorder(),
child: Column(

@ -0,0 +1,46 @@
import 'package:aku_new_community/constants/saas_api.dart';
import 'package:aku_new_community/gen/assets.gen.dart';
import 'package:aku_new_community/model/common/img_model.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class BeeAvatarWidget extends StatelessWidget {
final List<ImgModel>? imgs;
final List<String>? urls;
final double? width;
final double? height;
final BoxFit? fit;
const BeeAvatarWidget(
{Key? key,
this.imgs,
this.width,
this.height,
this.urls,
this.fit = BoxFit.cover})
: assert(imgs != null || urls != null),
super(key: key);
@override
Widget build(BuildContext context) {
return ClipOval(
child: FadeInImage.assetNetwork(
placeholder: Assets.images.placeholder.path,
image: imgs == null
? SAASAPI.image(urls!.isEmpty ? '' : urls!.first)
: SAASAPI.image(ImgModel.first(imgs)),
imageErrorBuilder: (context, obj, stackTrace) {
return Image.asset(
Assets.newIcon.avatarPlaceholder.path,
width: width ?? 128.w,
height: height ?? 128.w,
fit: fit,
);
},
height: height ?? 128.w,
width: width ?? 128.w,
fit: fit,
),
);
}
}

@ -1,14 +1,11 @@
import 'package:flutter/material.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:get/get.dart';
import 'package:provider/provider.dart';
import 'package:velocity_x/velocity_x.dart';
import 'package:aku_new_community/constants/application_objects.dart';
import 'package:aku_new_community/provider/app_provider.dart';
import 'package:aku_new_community/utils/headers.dart';
import 'package:aku_new_community/utils/login_util.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:velocity_x/velocity_x.dart';
class ApplicationView extends StatefulWidget {
final List<AO>? items;
@ -38,10 +35,10 @@ class _ApplicationViewState extends State<ApplicationView> {
onPressed: () {
if (LoginUtil.isNotLogin) return;
if (!LoginUtil.haveRoom(object.title)) return;
if (object.page == null) {
if (object.callback == null) {
BotToast.showText(text: '该功能正在准备上线中,敬请期待', align: Alignment(0, 0.5));
} else {
Get.to(object.page);
object.callback!();
}
},
child: Column(

File diff suppressed because it is too large Load Diff

@ -153,6 +153,7 @@ flutter:
- assets/json/
- assets/bracelet/
- assets/home/
- assets/newIcon/
import_sorter:
emojis: true

Loading…
Cancel
Save