import 'package:flutter/material.dart';
void main() {
runApp(MsgPage());
}
class MsgPage extends StatelessWidget {
const MsgPage({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'ListView Demo',
home: Scaffold(
appBar: AppBar(
title: Text('ListView Demo'),
backgroundColor: Colors.red,
),
body: new ListView.builder(
itemCount: 30,
itemBuilder: (context, index) {
return Text(
'item $index',
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 20.0,
color: Colors.pink,
),
);
},
)),
);
}
}