Skip to content

Instantly share code, notes, and snippets.

@CoderJava
Created May 7, 2020 15:51
Show Gist options
  • Select an option

  • Save CoderJava/fee8f23b9d09623f018046f9eb5b290f to your computer and use it in GitHub Desktop.

Select an option

Save CoderJava/fee8f23b9d09623f018046f9eb5b290f to your computer and use it in GitHub Desktop.
Widget ListView
import 'package:flutter/material.dart';
void main() => runApp(App());
class App extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: HomePage(),
);
}
}
class HomePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Flutter Demo'),
),
body: ListView(
children: <Widget>[
Container(
child: Text('HELLO WORLD 1'),
height: 200.0,
),Container(
child: Text('HELLO WORLD 2'),
height: 200.0,
),Container(
child: Text('HELLO WORLD 3'),
height: 200.0,
),Container(
child: Text('HELLO WORLD 4'),
height: 200.0,
),Container(
child: Text('HELLO WORLD 5'),
height: 200.0,
),Container(
child: Text('HELLO WORLD 6'),
height: 200.0,
),Container(
child: Text('HELLO WORLD 7'),
height: 200.0,
),Container(
child: Text('HELLO WORLD 8'),
height: 200.0,
),Container(
child: Text('HELLO WORLD 9'),
height: 200.0,
),
],
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment