-1

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?

starball
  • 20,030
  • 7
  • 43
  • 238
cindy
  • 11
  • 1
  • 1
    *how to fix the error?* - what error? Might you please [edit] your post to share the problem you are having, and where you are struck? See [ask]. – dbc Jan 05 '23 at 05:02

2 Answers2

0

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

0

Use this property inside "SingleChildScrollView",

 -scrollDirection: Axis.horizontal
Arshad
  • 45
  • 5