|
@@ -273,7 +273,11 @@ class ZefyrToolbarState extends State<ZefyrToolbar>
|
273
|
273
|
}
|
274
|
274
|
|
275
|
275
|
void closeOverlay() {
|
276
|
|
- if (!hasOverlay) return;
|
|
276
|
+ if (!hasOverlay) {
|
|
277
|
+ editor.showKeyboard();
|
|
278
|
+ editor.keepOverlay = false;
|
|
279
|
+ return;
|
|
280
|
+ }
|
277
|
281
|
_overlayAnimation.reverse().whenComplete(() async {
|
278
|
282
|
setState(() {
|
279
|
283
|
_overlayBuilder = null;
|
|
@@ -317,7 +321,12 @@ class ZefyrToolbarState extends State<ZefyrToolbar>
|
317
|
321
|
switch (platform) {
|
318
|
322
|
case TargetPlatform.iOS:
|
319
|
323
|
case TargetPlatform.android:
|
320
|
|
- widget = hasOverlay ? buildButton(context, ZefyrToolbarAction.showKeyboard) : buildButton(context, ZefyrToolbarAction.hideKeyboard);
|
|
324
|
+ if (MediaQuery.of(context).viewInsets.bottom == 0) {
|
|
325
|
+ widget = buildButton(context, ZefyrToolbarAction.showKeyboard);
|
|
326
|
+ } else {
|
|
327
|
+ widget = buildButton(context, ZefyrToolbarAction.hideKeyboard);
|
|
328
|
+ }
|
|
329
|
+ // widget = hasOverlay ? buildButton(context, ZefyrToolbarAction.showKeyboard) : buildButton(context, ZefyrToolbarAction.hideKeyboard);
|
321
|
330
|
break;
|
322
|
331
|
default:
|
323
|
332
|
break;
|
|
@@ -372,6 +381,7 @@ class ZefyrToolbarState extends State<ZefyrToolbar>
|
372
|
381
|
autoImplyTrailing: false,
|
373
|
382
|
);
|
374
|
383
|
layers.add(toolbar);
|
|
384
|
+ print(MediaQuery.of(context).viewInsets.bottom);
|
375
|
385
|
if (hasOverlay) {
|
376
|
386
|
Widget widget = Container(
|
377
|
387
|
height: keyboardHeight ?? 300,
|