Wednesday, November 4, 2026
HomeiOS Developmentandroid - My SingleChildScrollView doesn't work on Container what's unsuitable?

android – My SingleChildScrollView doesn’t work on Container what’s unsuitable?

[ad_1]

Tried to make a join display screen with a column and a kind, however the web page is displaying errors as a result of it overflowing. Checked on remedy this and all sources say I ought to enclose the Container in a ‘SingleChildScrollView’ widget, however this does not appear to repair the issue for me.

This is my code:

class RegisterPage extends StatelessWidget {
  @override
  Widget construct(BuildContext context) {
    // code for the register format
    return Scaffold(
      physique: SingleChildScrollView(
        little one: Container(
          padding: EdgeInsets.fromLTRB(47, 106, 47, 0),
          peak: MediaQuery.of(context).dimension.peak,
          little one: Column(
            youngsters: [
              Row(
                children: [
                Text(
                  'Create account',
                  style: TextStyle(color: Color(0xFFFD007C),
                    fontFamily: 'MontBlanc',
                    fontSize: 28,
                  ),
                ),
                ],
              ),
              SizedBox(peak: 19),
              Row(
                youngsters: [
                  Text(
                    'Or sign in with',
                    style: TextStyle(
                      fontFamily: 'TisaSansPro',
                      color: Color(0xFFACACAC),
                    ),
                  ),
                  SizedBox(width: 10),
                  ClipRect(
                    child: Container(
                      height: 20,
                      width: 20,
                      child: Image.asset('assets/icons8-google-48.png'),
                    ),
                  ),
                  SizedBox(width: 10),
                  Icon(
                    Icons.facebook,
                    color: Color(0xFF4267B2),
                  ),
                  SizedBox(width: 10),
                  Icon(
                    Icons.apple,
                    color: Color(0xFF555555),
                  ),
                ],
              ),
              SizedBox(peak: 39),
              Kind(
                little one: Column(
                  youngsters: [
                    TextFormField(
                      decoration: InputDecoration(
                        labelText: 'Email address',
                        floatingLabelBehavior: FloatingLabelBehavior.always,
                        hintText: 'abcdef@gmail.com',
                        border: OutlineInputBorder(
                          borderRadius: BorderRadius.circular(10),
                          borderSide: BorderSide(color: Color(0xFFECC2D6)),
                        ),
                        focusedBorder: OutlineInputBorder(
                          borderRadius: BorderRadius.circular(10),
                          borderSide: BorderSide(color: Color(0xFFFD007C)),
                        ),
                      ),
                    ),
                    SizedBox(height: 36),
                    TextFormField(
                      obscureText: true,
                      decoration: InputDecoration(
                        labelText: 'Password',
                        floatingLabelBehavior: FloatingLabelBehavior.always,
                        hintText: 'Input your password',
                        border: OutlineInputBorder(
                          borderRadius: BorderRadius.circular(10),
                          borderSide: BorderSide(color: Color(0xFFECC2D6)),
                        ),
                        focusedBorder: OutlineInputBorder(
                          borderRadius: BorderRadius.circular(10),
                          borderSide: BorderSide(color: Color(0xFFFD007C)),
                        ),
                      ),
                    ),
                    SizedBox(height: 82),
                    Container(
                      height: 45,
                      width: MediaQuery.of(context).size.width,
                      child: ElevatedButton(
                        onPressed: () => Navigator.pushNamed(context, route.loginPage),
                        style: ElevatedButton.styleFrom(primary: Color(0xFFFD007C), elevation: 4.0),
                        child: Text(
                          'Register',
                          style: TextStyle(
                            color: Colors.white,
                            fontFamily: 'TisaSansPro',
                          ),
                        ),
                      ),
                    ),
                  ],
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}

I’ve seemed on the code for any points however cant see any, I additionally tried utilizing the widget to wrap across the columns. I made a shorter kind on one other web page that did not overflow and that labored, however this does not.

[ad_2]

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments