Scroll ListView and GridView for scrollable widgets

This lesson is available for PRO members or as a single course purchase. Sign-in and choose a plan below.
SignUp for Unlimited PRO Access


*Enrollment provides full access to this course (and updates) for life.

Example Code

file_type_dartlang main.dart
class MyApp extends StatelessWidget {
 Widget build(BuildContext context) {
   return MaterialApp(
     home: Scaffold(
       body: ListView(
         scrollDirection: Axis.horizontal,
         children: _cards(),

 List<Widget> _cards() {
   return [1,2,3,4,5,6,7,8,9].map((v) => Container(
       margin: EdgeInsets.all(20),
       height: 100,
       child: Text('$v'),

Q&A Chat