Kaynağa Gözat

fix keyboardHeight

lucky1213 4 yıl önce
ebeveyn
işleme
6c137ddf5a

+ 2
- 2
packages/zefyr/lib/src/widgets/toolbar.dart Dosyayı Görüntüle

327
 
327
 
328
   @override
328
   @override
329
   Widget build(BuildContext context) {
329
   Widget build(BuildContext context) {
330
-    if (editor.toolbarAction == null && _keyboardHeight != MediaQuery.of(context).viewInsets.bottom) {
330
+    if (MediaQuery.of(context).viewInsets.bottom > 0 && _keyboardHeight == null) {
331
       _keyboardHeight = MediaQuery.of(context).viewInsets.bottom;
331
       _keyboardHeight = MediaQuery.of(context).viewInsets.bottom;
332
     }
332
     }
333
     final theme = ZefyrTheme.of(context).toolbarTheme;
333
     final theme = ZefyrTheme.of(context).toolbarTheme;
387
     } else {
387
     } else {
388
       layers.add(
388
       layers.add(
389
         Container(
389
         Container(
390
-          height: keyboardHeight,
390
+          height: editor.toolbarAction == null ? keyboardHeight : 0,
391
         ),
391
         ),
392
       );
392
       );
393
     }
393
     }