diff --git a/star_lock/lib/mine/message/messageDetail/messageDetail_page.dart b/star_lock/lib/mine/message/messageDetail/messageDetail_page.dart index 2db5581e..07fd571a 100644 --- a/star_lock/lib/mine/message/messageDetail/messageDetail_page.dart +++ b/star_lock/lib/mine/message/messageDetail/messageDetail_page.dart @@ -1,7 +1,7 @@ - import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; +import 'package:star_lock/flavors.dart'; import '../../../app_settings/app_colors.dart'; import '../../../tools/dateTool.dart'; @@ -22,28 +22,55 @@ class _MessageDetailPageState extends State { @override Widget build(BuildContext context) { return Scaffold( - backgroundColor: AppColors.mainBackgroundColor, - appBar: TitleAppBar( - barTitle: "消息详情".tr, - haveBack: true, - backgroundColor: AppColors.mainColor), - body: Container( - margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.h), - child: Obx(() => Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - "${"创建时间".tr}:${DateTool().dateToYMDHNString(state.itemData.value.createdAt!.toString())}", - style: TextStyle(fontSize: 22.sp, color: AppColors.placeholderTextColor), - ), - SizedBox(height: 20.h), - Text( - state.itemData.value.data!, - style: TextStyle(fontSize: 22.sp, color: AppColors.placeholderTextColor), - ), - ], - )), - ) + backgroundColor: AppColors.mainBackgroundColor, + appBar: F.sw( + defaultCall: () => TitleAppBar( + barTitle: "消息详情".tr, + haveBack: true, + backgroundColor: AppColors.mainColor, + ), + xhjCall: () => TitleAppBar( + barTitle: "消息详情".tr, + haveBack: true, + backgroundColor: Colors.white, + iconColor: AppColors.blackColor, + titleColor: AppColors.blackColor, + ), + ), + body: Container( + margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.h), + child: Obx(() => Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + "${"创建时间".tr}:${DateTool().dateToYMDHNString(state.itemData.value.createdAt!.toString())}", + style: TextStyle( + fontSize: 22.sp, color: AppColors.placeholderTextColor), + ), + SizedBox(height: 20.h), + textView(), + ], + )), + )); + } + + Widget textView() { + Widget view = Text( + state.itemData.value.data!, + style: TextStyle(fontSize: 22.sp, color: AppColors.placeholderTextColor), ); + return F.sw( + defaultCall: () => view, + xhjCall: () => Container( + padding: EdgeInsets.only( + top: 20.h, bottom: 20.h, left: 20.w, right: 20.w), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all(Radius.circular(20.r))), + child: ClipRRect( + borderRadius: BorderRadius.circular(20.r), + child: view, + ), + )); } } diff --git a/star_lock/lib/mine/message/messageList/messageList_xhj_page.dart b/star_lock/lib/mine/message/messageList/messageList_xhj_page.dart index 9d89898a..abde4798 100644 --- a/star_lock/lib/mine/message/messageList/messageList_xhj_page.dart +++ b/star_lock/lib/mine/message/messageList/messageList_xhj_page.dart @@ -72,6 +72,9 @@ class _MessageListXHJPageState extends State : null, body: Column( children: [ + SizedBox( + height: 15.h, + ), Container( width: 1.sw, height: 0.2.sw, diff --git a/star_lock/lib/mine/mine/starLockMine_page.dart b/star_lock/lib/mine/mine/starLockMine_page.dart index e285fa4a..b105c14a 100644 --- a/star_lock/lib/mine/mine/starLockMine_page.dart +++ b/star_lock/lib/mine/mine/starLockMine_page.dart @@ -77,10 +77,11 @@ class StarLockMinePageState extends State with BaseWidget { child: ClipRRect( borderRadius: BorderRadius.circular(52.5.w), child: CustomNetworkImage( - url: state.userHeadUrl.value ?? "", - defaultUrl: 'images/controls_user.png', - width: 105.w, - height: 105.h), + url: state.userHeadUrl.value ?? "", + defaultUrl: 'images/controls_user.png', + width: 105.w, + height: 105.h, + ), ), )), ), diff --git a/star_lock/lib/mine/minePersonInfo/minePersonInfoPage/minePersonInfo_page.dart b/star_lock/lib/mine/minePersonInfo/minePersonInfoPage/minePersonInfo_page.dart index e47dba72..31fa127c 100644 --- a/star_lock/lib/mine/minePersonInfo/minePersonInfoPage/minePersonInfo_page.dart +++ b/star_lock/lib/mine/minePersonInfo/minePersonInfoPage/minePersonInfo_page.dart @@ -30,7 +30,9 @@ class _MinePersonInfoPageState extends State { @override Widget build(BuildContext context) { return Scaffold( - backgroundColor: AppColors.mainBackgroundColor, + backgroundColor: F.sw( + defaultCall: () => AppColors.mainBackgroundColor, + xhjCall: () => AppColors.mainBackgroundColor), appBar: widget.showAppBar ? TitleAppBar( barTitle: TranslationLoader.lanKeys!.personalInformation!.tr, @@ -44,7 +46,8 @@ class _MinePersonInfoPageState extends State { xhjCall: () => Container( width: 1.sw, height: 0.2.sw, - margin: EdgeInsets.symmetric(horizontal: 15.w), + margin: + EdgeInsets.only(top: 15.h, left: 20.w, right: 20.w), padding: EdgeInsets.symmetric(horizontal: 25.w), decoration: BoxDecoration( image: const DecorationImage( diff --git a/star_lock/lib/tools/appFirstEnterHandle.dart b/star_lock/lib/tools/appFirstEnterHandle.dart index c48a8b2d..815df5c6 100644 --- a/star_lock/lib/tools/appFirstEnterHandle.dart +++ b/star_lock/lib/tools/appFirstEnterHandle.dart @@ -19,8 +19,9 @@ class AppFirstEnterHandle { switch (flagStr) { case isAgreePrivacy: // 隐私协议 { - if (getFlag != isAgreePrivacy) + if (getFlag != isAgreePrivacy) { showPrivacyAgreementAlert(widgetContext); + } } break; case isAgreePosition: // 位置权限 diff --git a/star_lock/lib/tools/customNetworkImage.dart b/star_lock/lib/tools/customNetworkImage.dart index 6b14818b..2456059f 100644 --- a/star_lock/lib/tools/customNetworkImage.dart +++ b/star_lock/lib/tools/customNetworkImage.dart @@ -12,34 +12,45 @@ class CustomNetworkImage extends StatelessWidget { final double width; final double height; final BoxFit boxFit; - const CustomNetworkImage({Key? key, required this.url, required this.defaultUrl, required this.width, required this.height, this.boxFit=BoxFit.cover}) : super(key: key); + + const CustomNetworkImage( + {Key? key, + required this.url, + required this.defaultUrl, + required this.width, + required this.height, + this.boxFit = BoxFit.cover}) + : super(key: key); @override Widget build(BuildContext context) { - return url.isNotEmpty ? CachedNetworkImage( - width: width, - height: height, - fit: boxFit, - imageUrl: url, - imageBuilder: (context, imageProvider) => Container( - decoration: BoxDecoration( - image: DecorationImage( - image: imageProvider, - fit: boxFit, - colorFilter: const ColorFilter.mode(Colors.transparent, BlendMode.colorBurn)), - ), - ), - errorWidget: (context, url, error) => Image.asset( - defaultUrl, - width: width, - height: height, - fit: BoxFit.fill, - ), - ) :Image.asset( - defaultUrl, - width: width, - height: height, - fit: BoxFit.fill, - ); + return url.isNotEmpty + ? CachedNetworkImage( + width: width, + height: height, + fit: boxFit, + imageUrl: url, + imageBuilder: (context, imageProvider) => Container( + decoration: BoxDecoration( + image: DecorationImage( + image: imageProvider, + fit: boxFit, + colorFilter: const ColorFilter.mode( + Colors.transparent, BlendMode.colorBurn)), + ), + ), + errorWidget: (context, url, error) => Image.asset( + defaultUrl, + width: width, + height: height, + fit: BoxFit.fill, + ), + ) + : Image.asset( + defaultUrl, + width: width, + height: height, + fit: BoxFit.fill, + ); } }