修复直播间打开弹窗键盘自动打开的问题

master
laiiihz 5 years ago
parent 8635da0e4c
commit fb202691da

@ -74,6 +74,8 @@ class _LivePageState extends State<LivePage> {
GlobalKey<LiveBuyingWidgetState> _globalBuyingWidgetKey =
GlobalKey<LiveBuyingWidgetState>();
FocusNode _focusNode = FocusNode();
@override
void initState() {
super.initState();
@ -437,6 +439,7 @@ class _LivePageState extends State<LivePage> {
),
child: TextField(
controller: _messageController,
focusNode: _focusNode,
onEditingComplete: () {
TencentImPlugin.sendMessage(
sessionId: _streamInfoModel.groupId,
@ -556,6 +559,7 @@ class _LivePageState extends State<LivePage> {
),
),
onPressed: () {
_focusNode.unfocus();
showGoodsListDialog(
context,
models: _streamInfoModel.goodsLists,
@ -676,6 +680,7 @@ class _LivePageState extends State<LivePage> {
Spacer(),
MorePeople(
onTap: () {
_focusNode.unfocus();
showModalBottomSheet(
context: context,
builder: (context) {

@ -69,6 +69,8 @@ class _LiveStreamViewPageState extends State<LiveStreamViewPage> {
GlobalKey<LiveBuyingWidgetState> _globalBuyingWidgetKey =
GlobalKey<LiveBuyingWidgetState>();
FocusNode _focusNode = FocusNode();
@override
void initState() {
super.initState();
@ -414,6 +416,7 @@ class _LiveStreamViewPageState extends State<LiveStreamViewPage> {
Spacer(),
MorePeople(
onTap: () {
_focusNode.unfocus();
showModalBottomSheet(
context: context,
builder: (context) {
@ -503,6 +506,7 @@ class _LiveStreamViewPageState extends State<LiveStreamViewPage> {
),
child: TextField(
controller: _editingController,
focusNode: _focusNode,
onEditingComplete: () {
TencentImPlugin.sendMessage(
sessionId: _streamInfoModel.groupId,
@ -765,6 +769,7 @@ class _LiveStreamViewPageState extends State<LiveStreamViewPage> {
),
),
onPressed: () {
_focusNode.unfocus();
showGoodsListDialog(
context,
onLive: true,

Loading…
Cancel
Save