Answers for "horizontal scrollview in flutter"

2

horizontal scrolling in fluitter

void main() => runApp(MyApp());
 
class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        home: Scaffold(
            body: SafeArea(
          //by default scroll directioin is vertical
              child: SingleChildScrollView(
          //changing scroll direction into horizontal
                scrollDirection: Axis.horizontal,
                child: Row(
                children: <Widget>[
 
                  
                ],
              ),
             ),
            )
           )
          );
  }
}
Posted by: Guest on June-12-2021
2

disable scrollview flutter

physics = NeverScrollableScrollPhysics()
Posted by: Guest on May-14-2020
0

flutter listview scroll horizontal

ListView(
  // This next line does the trick.
  scrollDirection: Axis.horizontal,
  children: <Widget>[
    Container(
      width: 160.0,
      color: Colors.red,
    ),
    Container(
      width: 160.0,
      color: Colors.blue,
    ),
    Container(
      width: 160.0,
      color: Colors.green,
    ),
    Container(
      width: 160.0,
      color: Colors.yellow,
    ),
    Container(
      width: 160.0,
      color: Colors.orange,
    ),
  ],
)
Posted by: Guest on April-18-2021
1

flutter create vertical list

ListView(
  padding: const EdgeInsets.all(8),
  children: <Widget>[
    Container(
      height: 50,
      color: Colors.amber[600],
      child: const Center(child: Text('Entry A')),
    ),
    Container(
      height: 50,
      color: Colors.amber[500],
      child: const Center(child: Text('Entry B')),
    ),
    Container(
      height: 50,
      color: Colors.amber[100],
      child: const Center(child: Text('Entry C')),
    ),
  ],
)
Posted by: Guest on March-28-2020

Code answers related to "horizontal scrollview in flutter"

Browse Popular Code Answers by Language