ListView list of components
-
Use the ListView, then in his internal children, the use of the widget array, because it is a list, so it accepts an array, then there is used listTite components (list tile), place the icons and text in the assembly.
-
Put icons and text
import 'package:flutter/material.dart';
void main () => runApp(MyApp());
class MyApp extends StatelessWidget{
@override
Widget build(BuildContext context){
return MaterialApp(
title: 'Hello world',
home: Scaffold(
appBar: AppBar(
title: Text('Flutter')
),
body: new ListView(
children:<Widget>[
new ListTile(
leading:new Icon(Icons.access_time),
title:new Text('access_time')
),
new ListTile(
leading:new Icon(Icons.account_balance),
title:new Text('account_balance')
),
]
),
),
);
}
}
- Put more pictures
import 'package:flutter/material.dart';
void main () => runApp(MyApp());
class MyApp extends StatelessWidget{
@override
Widget build(BuildContext context){
return MaterialApp(
title: 'Hello world',
home: Scaffold(
appBar: AppBar(
title: Text('Flutter')
),
body: new ListView(
children:<Widget>[
new Image.network(
'http://pic.58pic.com/58pic/15/11/51/20E58PICNs4_1024.jpg'
),
new Image.network(
'http://pic.58pic.com/58pic/15/11/51/20E58PICNs4_1024.jpg'
),
]
),
),
);
}
}