UI修改
This commit is contained in:
parent
a2a5d2813f
commit
245c647260
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user