This commit is contained in:
18631081161 2024-08-03 19:37:17 +08:00
parent a2a5d2813f
commit 245c647260
3 changed files with 27 additions and 18 deletions

View File

@ -51,7 +51,7 @@ class _ChatPageState extends State<ChatPage> {
bool isMore = false;
bool isHalf = true;
bool isHalf = false;
///
String text = "";
@ -511,7 +511,7 @@ class _ChatPageState extends State<ChatPage> {
margin: EdgeInsets.only(left: 14),
child: Image(
width: w27,
image: AssetImage('assets/images/ic_more.png'),
image: !isMore ? AssetImage('assets/images/ic_more.png') : AssetImage('assets/images/ic_more_no.png'),
),
),
),
@ -773,12 +773,10 @@ class _ChatPageState extends State<ChatPage> {
borderRadius:
BorderRadius.only(topLeft: Radius.circular(16.0), bottomLeft: Radius.circular(16.0), bottomRight: Radius.circular(16.0)),
),
child: Text(
chatList[index].content!,
style: const TextStyle(
fontSize: 14,
color: Color(0xFFE8E8E8),
),
child: DynamicText(
text: replaceBracketsWithAsterisks(chatList[index].content!),
highlightedStyle: TextStyle(color: Color(0xFF999999), fontStyle: FontStyle.italic, fontSize: 14, height: 1.4), //
normalStyle: TextStyle(color: Colors.white, fontSize: 14, height: 1.4), //
),
),
),
@ -787,6 +785,11 @@ class _ChatPageState extends State<ChatPage> {
);
}
String replaceBracketsWithAsterisks(String text) {
// 使
return text.replaceAll(RegExp(r'[()]|[\uFF08\uFF09]'), '*');
}
popupView(int id, String content, index, customController) {
return Container(
width: 135,

View File

@ -774,12 +774,10 @@ class _HomeChatPageState extends State<HomeChatPage> with AutomaticKeepAliveClie
borderRadius:
BorderRadius.only(topLeft: Radius.circular(16.0), bottomLeft: Radius.circular(16.0), bottomRight: Radius.circular(16.0)),
),
child: Text(
chatList[index].content!,
style: const TextStyle(
fontSize: 14,
color: Color(0xFFE8E8E8),
),
child: DynamicText(
text: replaceBracketsWithAsterisks(chatList[index].content!),
highlightedStyle: TextStyle(color: Color(0xFF999999), fontStyle: FontStyle.italic, fontSize: 14, height: 1.4), //
normalStyle: TextStyle(color: Colors.white, fontSize: 14, height: 1.4), //
),
),
),
@ -788,6 +786,11 @@ class _HomeChatPageState extends State<HomeChatPage> with AutomaticKeepAliveClie
);
}
String replaceBracketsWithAsterisks(String text) {
// 使
return text.replaceAll(RegExp(r'[()]|[\uFF08\uFF09]'), '*');
}
popupView(int id, String content, index, customController, w135, h40) {
return Container(
width: w135,

View File

@ -190,7 +190,7 @@ class _MePageState extends State<MePage> {
Container(
margin: EdgeInsets.only(left: 17),
child: Text(
'货币${userInfoBean.currency}',
'语珠${userInfoBean.currency}',
style: TextStyle(color: Color(0xFFE1E1E1), fontSize: 13),
),
),
@ -239,10 +239,13 @@ class _MePageState extends State<MePage> {
margin: EdgeInsets.symmetric(horizontal: 16),
child: GestureDetector(
onTap: () {
Navigator.pushNamed(context, '/LoginPage');
// Navigator.pushNamed(context, '/LoginPage');
},
child: Image(
image: AssetImage('assets/images/ic_web.png'),
child: CachedNetworkImage(
width: w58,
height: w58,
imageUrl: userInfoBean.inviteNewUser!.imgUrl!,
errorWidget: (context, url, error) => const Icon(Icons.error),
),
),
),