class HomePageState extends State{
final topTitles = ['审批单', '机票列表', '客服'];
final topIcons = ['assets/home/approval.png', 'assets/home/air_ticket.png', 'assets/home/service.png'];
@override
Widget build(BuildContext context) {
// TODO: implement build
return new Scaffold(
appBar: AppBar(
title: Text('首页')
),
body: Column(
children: [
//顶部
Row(
children: topTitles.asMap().keys.map((f)=>
//f拿到的就是下标:
Expanded(
flex: ,
child: Column(
children: [
Image(
image: new AssetImage(topIcons[f]),
height: , width: ),
Text(topTitles[f])
],
),
)).toList(),
),
//列表
],
),
);
}
@