Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

import 'package:flutter/material.

dart';

void main() {
runApp(ScrollingApp());
}

class ScrollingApp extends StatelessWidget {


@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Scrolling Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: ScrollingScreen(),
);
}
}

class ScrollingScreen extends StatelessWidget {


@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Scrolling Demo'),
),
body: ListView(
padding: EdgeInsets.all(16.0),
children: List.generate(
50,
(index) => ListTile(
title: Text('Item $index'),
subtitle: Text('Subtitle for Item $index'),
onTap: () {
// Handle item tap
print('Tapped on Item $index');
},
),
),
),
);
}
}

You might also like