skip to Main Content

I have a bottom textField when i click it the keyboard shows up and hide the content.
I tried using: padding: MediaQuery.of(context).viewInsets and resizetoavoidbottominset but nothing works.

My widget tree is: Scaffold->SafeArea->Padding->SingleChildScrollView->Form

Scaffold(
    resizeToAvoidBottomInset: true,
    body: SafeArea(
      child: Padding(
        padding: EdgeInsets.symmetric(
          horizontal: 20.0.w,
        ),
        child: SingleChildScrollView(
          child: Form(
          key: _formKey,
          child: Column(

before i click on the contact number

after i click on the contact number

2

Answers


  1. Try adding viewInsets.bottom in the bottom padding in you Padding widget as below:

    EdgeInsets.only(bottom: MediaQuery.of(context).viewInsets.bottom),
    
    Login or Signup to reply.
  2. I found success with this solution.

    Padding(padding: EdgeInsets.only(
                     bottom: MediaQuery.of(context).viewInsets.bottom));
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search