如何在正文中的 ListTile 上方添加一些 Text 或 TextField 或其他内容?

问题描述

ListTile 是这里 body 中唯一的东西。知道为什么。 我现在无法在正文中创建任何内容,甚至是文本。 这是我的代码,似乎我不知道项目的正确结构。 这就是应用程序的样子: https://vk.com/im?peers=420186915_-51497091_c21_-104755778_401520442_186961199_c1_188402691_596510656_312494247_493063710_171187154_161887710_c4_160881882_c2_-157369801&sel=221808173&z=photo478522815_457252372%2Fmail269045

我已经用卡片制作了 ListVies,但无法在上面添加搜索区域

      @override
      Widget build(BuildContext context) {
        return Scaffold(
          body: ListView.builder(
              physics: BouncingScrollPhysics(),itemCount: events.length,itemBuilder: (_,index) => Card(
                    elevation: 10,shadowColor: Colors.white,margin: EdgeInsets.symmetric(vertical: 10,horizontal: 15),shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)),child: ListTile(
                      title: Text(
                        events[index].name,style: TextStyle(
                          fontSize: 13,),subtitle: Text(
                        "${events[index].spot} ${events[index].price}",style: TextStyle(
                          fontSize: 20.0,//isThreeLine: true,leading: SvgPicture.asset("assets/images/car_icon.svg"),onTap: () => print("${events[index].name} - tap"),)
          ),);
      }

解决方法

IPHONEOS_DEPLOYMENT_TARGET = 11.0

}enter image description here

,

你可以用一列包裹你的列表视图,就像这样:

Container{
  Column{
    ......