xuty 2 лет назад
Родитель
Сommit
7e5b3b1dce
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      lib/src/ui/keyboard_visibility.dart

+ 1 - 1
lib/src/ui/keyboard_visibility.dart

@@ -36,7 +36,7 @@ class KeyboardVisibiltyState extends State<KeyboardVisibilty>
 
 
   @override
   @override
   void didChangeMetrics() {
   void didChangeMetrics() {
-    final bottomInset = window.viewInsets.bottom;
+    final bottomInset = View.of(context).viewInsets.bottom;
 
 
     if (bottomInset != _lastBottomInset) {
     if (bottomInset != _lastBottomInset) {
       if (bottomInset > 0) {
       if (bottomInset > 0) {