-1

How can i scroll horizontally with scrollabe in vertical scrollabale widget(SinglechildScrollview) ?

Rajni Gujarati
  • 2,709
  • 1
  • 10
  • 16

1 Answers1

0

You can try this example,

class TestScreen extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(),
      body: Container(
        padding: const EdgeInsets.all(10),
        child: SingleChildScrollView(
          child: Column(
            children: [
              SingleChildScrollView(
                scrollDirection: Axis.horizontal,
                padding: const EdgeInsets.symmetric(vertical: 10),
                child: Row(
                  children: [1,2,3,4,5].map((url) {
                    return Container(
                      width: 100.0,
                      height: 100.0,
                      margin: EdgeInsets.symmetric(horizontal: 5.0),
                      decoration: BoxDecoration(
                        color: Colors.red,
                      ),
                    );
                  }).toList(),
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}

let me know if it help to you.

Rajni Gujarati
  • 2,709
  • 1
  • 10
  • 16