0

I'm trying to create a scrollable register form for a Flutter app. I got SingleChildScroll to work, but theres a large padding or inset or something on top of the keyboard that can block content. You can see if pretty well If I scroll all they way to the bottom.

enter image description here

Here's my code.

Widget _buildContainer() {
    return Row(
      mainAxisAlignment: MainAxisAlignment.center,
      children: <Widget>[
        ClipRRect(
          // This Clips the border Radius of the Container
          borderRadius: const BorderRadius.all(
            Radius.circular(20),
          ),

          child: Container(
            // This sets the attributes of the Container
            height: MediaQuery.of(context).size.height * 0.69,
            width: MediaQuery.of(context).size.width * 0.9,
            decoration: const BoxDecoration(
              color: Colors.white,
            ),

            child: Scaffold(
              body: SingleChildScrollView(
                child: Form(
                  key: _formKey,
                  child: Column(
                    mainAxisAlignment: MainAxisAlignment.center,
                    children: <Widget>[
                      _buildFirstNameRow(),
                      _buildLastNameRow(),
                      _buildEmailRow(),
                      _buildPasswordRow(),
                      _buildConfirmPasswordRow(),
                      _buildRegisterButton(),
                    ],
                  ),
                ),
              ),
            ),
          ),
        ),
      ],
    );
  }

I've tried setting resizeToAvoidBottomInset: false, in the Scaffold, but that prevents any scrolling from happening.

I've also tried adding to Scaffold as well, but that only changes the padding around that mystery inset.

body: Padding(        
padding: EdgeInsets.only(
                  bottom: 8.0),

Thanks for your Help!

Watson221
  • 73
  • 7
  • Upon further Testing, the size of the mystery inset correlates to the height of my container. I'm not sure how to unlink those however. – Watson221 Feb 11 '23 at 23:28
  • What you want to do is prevent `SingleChildScrollView` from scrolling? – My Car Feb 12 '23 at 00:32
  • @MyCar My Goal is to get rid of the space between the keyboard and the bottom of the scroll range. Its a block of white space that can obscure other textfields while scrolling. I want ```SingleChildScrollView``` to scroll – Watson221 Feb 12 '23 at 01:23

0 Answers0