feat:优化鑫泓佳 ui

This commit is contained in:
anfe 2024-04-30 13:41:34 +08:00
parent 127ec95537
commit 91327ab395
6 changed files with 102 additions and 56 deletions

View File

@ -1,7 +1,7 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:star_lock/flavors.dart';
import '../../../app_settings/app_colors.dart'; import '../../../app_settings/app_colors.dart';
import '../../../tools/dateTool.dart'; import '../../../tools/dateTool.dart';
@ -23,10 +23,20 @@ class _MessageDetailPageState extends State<MessageDetailPage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar( appBar: F.sw(
defaultCall: () => TitleAppBar(
barTitle: "消息详情".tr, barTitle: "消息详情".tr,
haveBack: true, haveBack: true,
backgroundColor: AppColors.mainColor), backgroundColor: AppColors.mainColor,
),
xhjCall: () => TitleAppBar(
barTitle: "消息详情".tr,
haveBack: true,
backgroundColor: Colors.white,
iconColor: AppColors.blackColor,
titleColor: AppColors.blackColor,
),
),
body: Container( body: Container(
margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.h), margin: EdgeInsets.only(left: 20.w, right: 20.w, top: 20.h),
child: Obx(() => Column( child: Obx(() => Column(
@ -34,16 +44,33 @@ class _MessageDetailPageState extends State<MessageDetailPage> {
children: [ children: [
Text( Text(
"${"创建时间".tr}:${DateTool().dateToYMDHNString(state.itemData.value.createdAt!.toString())}", "${"创建时间".tr}:${DateTool().dateToYMDHNString(state.itemData.value.createdAt!.toString())}",
style: TextStyle(fontSize: 22.sp, color: AppColors.placeholderTextColor), style: TextStyle(
fontSize: 22.sp, color: AppColors.placeholderTextColor),
), ),
SizedBox(height: 20.h), SizedBox(height: 20.h),
Text( textView(),
state.itemData.value.data!,
style: TextStyle(fontSize: 22.sp, color: AppColors.placeholderTextColor),
),
], ],
)), )),
) ));
}
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,
),
));
} }
} }

View File

@ -72,6 +72,9 @@ class _MessageListXHJPageState extends State<MessageListXHJPage>
: null, : null,
body: Column( body: Column(
children: [ children: [
SizedBox(
height: 15.h,
),
Container( Container(
width: 1.sw, width: 1.sw,
height: 0.2.sw, height: 0.2.sw,

View File

@ -80,7 +80,8 @@ class StarLockMinePageState extends State<StarLockMinePage> with BaseWidget {
url: state.userHeadUrl.value ?? "", url: state.userHeadUrl.value ?? "",
defaultUrl: 'images/controls_user.png', defaultUrl: 'images/controls_user.png',
width: 105.w, width: 105.w,
height: 105.h), height: 105.h,
),
), ),
)), )),
), ),

View File

@ -30,7 +30,9 @@ class _MinePersonInfoPageState extends State<MinePersonInfoPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: AppColors.mainBackgroundColor, backgroundColor: F.sw(
defaultCall: () => AppColors.mainBackgroundColor,
xhjCall: () => AppColors.mainBackgroundColor),
appBar: widget.showAppBar appBar: widget.showAppBar
? TitleAppBar( ? TitleAppBar(
barTitle: TranslationLoader.lanKeys!.personalInformation!.tr, barTitle: TranslationLoader.lanKeys!.personalInformation!.tr,
@ -44,7 +46,8 @@ class _MinePersonInfoPageState extends State<MinePersonInfoPage> {
xhjCall: () => Container( xhjCall: () => Container(
width: 1.sw, width: 1.sw,
height: 0.2.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), padding: EdgeInsets.symmetric(horizontal: 25.w),
decoration: BoxDecoration( decoration: BoxDecoration(
image: const DecorationImage( image: const DecorationImage(

View File

@ -19,9 +19,10 @@ class AppFirstEnterHandle {
switch (flagStr) { switch (flagStr) {
case isAgreePrivacy: // case isAgreePrivacy: //
{ {
if (getFlag != isAgreePrivacy) if (getFlag != isAgreePrivacy) {
showPrivacyAgreementAlert(widgetContext); showPrivacyAgreementAlert(widgetContext);
} }
}
break; break;
case isAgreePosition: // case isAgreePosition: //
{ {

View File

@ -12,11 +12,20 @@ class CustomNetworkImage extends StatelessWidget {
final double width; final double width;
final double height; final double height;
final BoxFit boxFit; 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 @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return url.isNotEmpty ? CachedNetworkImage( return url.isNotEmpty
? CachedNetworkImage(
width: width, width: width,
height: height, height: height,
fit: boxFit, fit: boxFit,
@ -26,7 +35,8 @@ class CustomNetworkImage extends StatelessWidget {
image: DecorationImage( image: DecorationImage(
image: imageProvider, image: imageProvider,
fit: boxFit, fit: boxFit,
colorFilter: const ColorFilter.mode(Colors.transparent, BlendMode.colorBurn)), colorFilter: const ColorFilter.mode(
Colors.transparent, BlendMode.colorBurn)),
), ),
), ),
errorWidget: (context, url, error) => Image.asset( errorWidget: (context, url, error) => Image.asset(
@ -35,7 +45,8 @@ class CustomNetworkImage extends StatelessWidget {
height: height, height: height,
fit: BoxFit.fill, fit: BoxFit.fill,
), ),
) :Image.asset( )
: Image.asset(
defaultUrl, defaultUrl,
width: width, width: width,
height: height, height: height,