简体   繁体   中英

SingleChildScrollView is not Scrollable

I am trying to add SingleChildScrollView for the page but it appears to be not working, can't figure the reason. I am not getting any overflow errors as such but the Fitbutton is not visible on the screen. I tried searching on the net but didn't find any relevant solution. This is the code snippet I tried:

return Scaffold(
        body:SingleChildScrollView(
          child: Form(
                key:_formKey,
                child: Padding(
                  padding: const EdgeInsets.all(0.0),
                  child: Stack(
                    children: <Widget>[
                      Container(
                          decoration:( ...
                           ),
                          )
                      ),
                      Positioned(
                          
                          top: MediaQuery.of(context).size.width * 0.10,
                          child: Container(
                            margin: EdgeInsets.all(13.0),
                            child:Column(
                                mainAxisAlignment: MainAxisAlignment.center,
                                children: <Widget>[
                                  Text("Welcome",style: TextStyle(fontWeight: FontWeight.bold,fontSize: 25.0),),
                                  SizedBox(
                                    height: 22,
                                  ),
                                  Stack(
                                    alignment: Alignment.centerLeft,
                                    children: [
                                      Container(
                                        height:60.0,
                                        padding: EdgeInsets.only(left: 53.0),
                                        child: buildNameField()
                                      ),
                                      CircleAvatar(
                                        ...
                                      ),
                                    ],
                                  ),
                                  SizedBox(
                                    height: 22.0,
                                  ),
                                  Stack(
                                    alignment: Alignment.centerLeft,
                                    children: [
                                      .....
                                    ],
                                  ),
                                  SizedBox(
                                    height: 10,
                                  ),
                                  Stack(
                                    alignment: Alignment.centerLeft,
                                    children: [
                                      ...
                                    ],
                                  ),
                                  
                                  SizedBox(height: 22),
                                  FitButton(
                                    ....
                                  ),
                                  Padding(
                                    padding: const EdgeInsets.only(top: 16),
                                    child: _buildSignInButton(),
                                  ),
                                ]
                            ),
                          ),
                      ),],
                  ),
                ),
              ),),
     );

Any help would be great !!

Remove SingleChildScrollView from Form and Wrap to Column may be solved.

Try wrapping the form in a sizedBox and then wrapping the sizedBox with the SingleChildScrollView

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM