0

At the moment my app works like following:

When the dialog is opened: enter image description here

When user clicks on textFormFields to inter some text: enter image description here

What I am looking for to do is to keep Dialog's( or all the contents on the screen) same as before and keyboard just comes over them without changing their size or view.

How can I do that?

EDIT: I need something like resizeToAvoidBottomInset that works only with Scaffold but for other kind of widgets like Dialog.

best_of_man
  • 643
  • 2
  • 15
  • or are you trying to make it minimal view on dialog, like on second image? the question is lacking of debuging details, a sample minimal widget will explain better. More about [minimal-reproducible-example](https://stackoverflow.com/help/minimal-reproducible-example) – Md. Yeasin Sheikh Mar 05 '23 at 22:58
  • @YeasinSheikh: No the current behavior is like the photos I have put in the question. What I want to do is disabling this behavior and keyboard just overlaps the normal screen. – best_of_man Mar 05 '23 at 23:11
  • @YeasinSheikh: The answer by @Nikita Shadkov suggests what I want, but it only works with `Scaffold` and I need something that works with other widgets like `Dialog` as well. – best_of_man Mar 05 '23 at 23:12
  • It is still not clear to me how the UI will represent when the keyboard will pop. More about [asking good question](https://stackoverflow.com/help/how-to-ask) – Md. Yeasin Sheikh Mar 05 '23 at 23:21
  • @YeasinSheikh: I think this answer (https://stackoverflow.com/a/69234481/20706987) answers my question but I was looking for a simpler property of Flutter itself. – best_of_man Mar 05 '23 at 23:32
  • @YeasinSheikh: Could you have a look at here https://stackoverflow.com/questions/75730093/how-to-create-a-list-of-videoplayer-widgets-in-flutter – best_of_man Mar 14 '23 at 15:38

1 Answers1

1

You can use resizeToAvoidBottomInset to implement this behaviour.

Scaffold(
  resizeToAvoidBottomInset: false,
  ...
)

original answer link

Nikita Shadkov
  • 372
  • 3
  • 11
  • What about the widgets? For example my question is about a Dialog widget that doesn't have such a property. – best_of_man Mar 05 '23 at 22:01
  • you're always can wrap it with any widget you want) at least could try. I will suggest parse this property in the nearest Scaffold you have, and if it won't work, just wrap your dialog – Nikita Shadkov Mar 05 '23 at 23:49