fix(player): 返回键仅收起评论输入键盘
This commit is contained in:
1 parent
a66cdb2e1b
commit
ea1a9f424b
2 files changed
+39
-24
No files matched your search
@@ -4,6 +4,7 @@ import 'dart:async';
|
||||
import 'dart:math' as math;
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
import '../../../core/data/models/comment.dart';
|
||||
@@ -202,7 +203,12 @@ class _DramaCommentsSheetState extends State<DramaCommentsSheet> {
|
||||
return PopScope(
|
||||
canPop: _composerOverlay == null,
|
||||
onPopInvokedWithResult: (didPop, _) {
|
||||
if (!didPop && _composerOverlay != null) _closeComposer();
|
||||
if (!didPop && _composerOverlay != null) {
|
||||
FocusManager.instance.primaryFocus?.unfocus();
|
||||
unawaited(
|
||||
SystemChannels.textInput.invokeMethod<void>('TextInput.hide'),
|
||||
);
|
||||
}
|
||||
},
|
||||
child: content,
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user