Answers for "horizontal scrolling 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
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 scrolling flutter"

Code answers related to "Dart"

Browse Popular Code Answers by Language