skip to Main Content

this is my code… it says errorerror

SingleChildScrollView(
                child: Row(
                  mainAxisAlignment: MainAxisAlignment.spaceAround,
                  children: [
                    weightIndicator(
                      0,
                      '0,2 kg',
                    ),
                    weightIndicator(
                      0,
                      '0,4 kg',
                    ),
                    weightIndicator(
                      0,
                      '0,6 kg',
                    ),
                    weightIndicator(
                      0,
                      '0,8 kg',
                    ),
                    weightIndicator(
                      0,
                      '1,0 kg',
                    ),
              ],
            ),
          ),

how to fix the error?

2

Answers


  1. Instead of using this Row with SingleChildScrollView , you can either use Wrap or use the ListView with the axisDirection as Axis.horizontal

    Login or Signup to reply.
  2. Use this property inside "SingleChildScrollView",

     -scrollDirection: Axis.horizontal
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search