|
|
|
@ -55,7 +55,6 @@ class _ClassDetails extends State<ClassDetails> with WidgetsBindingObserver {
|
|
|
|
|
double height = 0; |
|
|
|
|
var isShowMore = false; |
|
|
|
|
bool emojiShowing = false; |
|
|
|
|
static double keyboard_height=300; |
|
|
|
|
double keyboard = -1; |
|
|
|
|
bool needShowSmiley = false; |
|
|
|
|
bool needHideSmiley = false; |
|
|
|
@ -117,6 +116,7 @@ class _ClassDetails extends State<ClassDetails> with WidgetsBindingObserver {
|
|
|
|
|
@override |
|
|
|
|
void didChangeMetrics() { |
|
|
|
|
WidgetsBinding.instance.addPostFrameCallback((_) { |
|
|
|
|
isKeyBoardShow = MediaQuery.of(context).viewInsets.bottom > 0; |
|
|
|
|
if (!mounted) return; |
|
|
|
|
if (MediaQuery.of(context).viewInsets.bottom == 0) { |
|
|
|
|
if (isKeyBoardShow) { |
|
|
|
@ -185,7 +185,7 @@ class _ClassDetails extends State<ClassDetails> with WidgetsBindingObserver {
|
|
|
|
|
@override |
|
|
|
|
Widget build(BuildContext context) { |
|
|
|
|
double h = MediaQuery.of(context).viewInsets.bottom; |
|
|
|
|
if(h > 0 && keyboard <= 0) { |
|
|
|
|
if(h > 0 && keyboard < h) { |
|
|
|
|
setState(() { |
|
|
|
|
keyboard = h; |
|
|
|
|
}); |
|
|
|
@ -475,7 +475,6 @@ class _ClassDetails extends State<ClassDetails> with WidgetsBindingObserver {
|
|
|
|
|
inputKey, |
|
|
|
|
hintText, |
|
|
|
|
isKeyBoardShow, |
|
|
|
|
keyboard_height, |
|
|
|
|
keyboard, |
|
|
|
|
emojiShowing, |
|
|
|
|
commentFocus, |
|
|
|
|