How to stack a container over keyboard in Flutter, similar to WhatsApp "more" section in chat
Asked Answered
I

4

9

How can I stack a Container over a keyboard similar to WhatsApp more section just like the below gif?

enter image description here

Alternatively, I tried using a bottom sheet, but bottom sheet closed the keyboard and then opened it up.

Iridotomy answered 16/5, 2021 at 12:14 Comment(4)
Does this answer your question ? Avoiding the On-Screen Keyboard in FlutterMarriage
No, I don't think so.Iridotomy
This is possible on Android, check this article hereAthelstan
How can it be done on flutter? like a hybrid for both ios and android?Iridotomy
L
3

Unfortunately as other answers have said if you really want this you have to use a Custom In-App Keyboard, even though it's a lot of work.

Drawing over the keyboard is indeed possible on Android, but it is not possible at all on iOS. If you check the same functionality in WhatsApp on iOS it does not do that animation since iOS does not allow it.

The issue here is that the keyboard is controlled by the phone's operating system so Flutter is not allowed to render over it, just as you can't render over the status bar at the top of the screen.

Lindgren answered 3/8, 2022 at 12:8 Comment(0)
O
-1

This article at Medium titled "Custom In-App Keyboard in Flutter" by someone called "Suragch" might help you.

Custom In-App Keyboard in Flutter by Suragch

Oconnell answered 23/5, 2021 at 4:33 Comment(2)
I checked out this, but I do not want to create the keyboard from scratch it would be very cumbersome. I want a way out to overlay something above the default keyboardIridotomy
this would have limitations too. Like what if the user had a customized keyboard? Their autosaved custom sentences? etc. There is too much variable to handle to be worth it.Stoughton
C
-1

The best solution for this is hiding the keyboard using the focus node:

 void _unFocusKeyboard() {
    FocusScope.of(context).unfocus();
 }
Clinker answered 27/9, 2023 at 18:10 Comment(0)
M
-2

I think is an animation to a "Container" at the bottom of the screen.

Marinetti answered 10/8, 2021 at 10:1 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.