修改登录页面点击背景键盘无法收起,增加聊天屏蔽词无法发出功能
This commit is contained in:
parent
030041e5ca
commit
b3e43fd187
@ -332,8 +332,9 @@ bool isSendLoging = false;
|
||||
var data = await DioManager.instance
|
||||
.post(url: Api.shieldWordCheck, params: {'text': text, 'type': 2});
|
||||
isSendLoging = false;
|
||||
List words = [];
|
||||
if (data['data']['code'] == 10000) {
|
||||
List words = data['data']['words'];
|
||||
words = data['data']['words'];
|
||||
if (words.isNotEmpty) {
|
||||
for (int i = 0; i < words.length; i++) {
|
||||
text = text.replaceAll(words[i], '*');
|
||||
@ -341,10 +342,17 @@ bool isSendLoging = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (words.isEmpty) {
|
||||
MessageUtils.handleMessageError(
|
||||
widget.model.sendTextMessage(
|
||||
text: text, convID: widget.conversationID, convType: convType),
|
||||
context);
|
||||
} else {
|
||||
textEditingController.text = text;
|
||||
showOKToast('含违规词汇,无法发送');
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
textEditingController.clear();
|
||||
currentCursor = null;
|
||||
|
||||
@ -174,9 +174,10 @@ class Complete_materialPage extends StatelessWidget {
|
||||
left: 28.sp,
|
||||
right: 28.sp),
|
||||
height: 116.sp,
|
||||
width: Get.width - 50.sp,
|
||||
child: Stack(
|
||||
children: [
|
||||
Image.asset(getLoginImage('desc_bg')),
|
||||
Image.asset(getLoginImage('desc_bg'),width: Get.width - 50.sp,fit: BoxFit.fill,),
|
||||
TextField(
|
||||
maxLines: 4,
|
||||
controller:
|
||||
|
||||
@ -26,14 +26,14 @@ class LoginPage extends StatelessWidget {
|
||||
width: Get.width,
|
||||
height: Get.height,
|
||||
),
|
||||
Scaffold(
|
||||
resizeToAvoidBottomInset: false,
|
||||
backgroundColor: Colors.transparent,
|
||||
body: GestureDetector(
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
FocusManager.instance.primaryFocus?.unfocus();
|
||||
},
|
||||
child: GetBuilder<LoginLogic>(builder: (logic) {
|
||||
child: Scaffold(
|
||||
resizeToAvoidBottomInset: false,
|
||||
backgroundColor: Colors.transparent,
|
||||
body: GetBuilder<LoginLogic>(builder: (logic) {
|
||||
return Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
@ -287,8 +287,8 @@ class LoginPage extends StatelessWidget {
|
||||
|
||||
],
|
||||
);
|
||||
}),
|
||||
)),
|
||||
})),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user