小编dav*_*idk的帖子

Flutter:我可以向ListView添加标题行吗?

对Flutter来说很新.我已经能够利用HTTP请求数据,构建ListView,编辑该列表中的行和其他基础知识.环境优美.

我已经设法将一个构造糟糕的Header拼凑成一个ListView ......但我知道这是不对的.我无法正确排列Header文本.

我看到Drawer类有一个DrawerHeader类,但是看不到ListView有一个ListViewHeader.

  @override
  Widget build(BuildContext context) {
    return new Scaffold(
        appBar: new AppBar(
          title: new Text('Contacts'),
          actions: [
            new IconButton(icon: new Icon(Icons.add_circle),
                onPressed: getCustData
            ),
          ],
        ),
        //body:
        body: new Column(
            children: [
              new Row(
                  children: [
                    new Expanded(child: new Text('', style: new TextStyle(height: 3.0, fontSize: 15.2, fontWeight: FontWeight.bold,))),
                    new Expanded(child: new Text('First Name', style: new TextStyle(height: 3.0, fontSize: 15.2, fontWeight: FontWeight.bold,))),
                    new Expanded(child: new Text('Last Name', style: new TextStyle(height: 3.0, fontSize: 15.2, fontWeight: FontWeight.bold,))),
                    new Expanded(child: new …

listview header flutter

24
推荐指数
8
解决办法
1万
查看次数

标签 统计

flutter ×1

header ×1

listview ×1