android - 如何在任何列表视图项目中间添加卡片 - 颤动?
问题描述
我正在尝试这样做(图片)我正在尝试创建一个博客页面,我需要在 ListView 本身中进行一些即时修改(管理端)。
我试过(代码) ... 可扩展的 ListView - 加载和滚动也需要时间 - 其中包含 Textfield 和其中的一些按钮(更新、删除和取消)
import 'package:flutter/material.dart';
class ExpandableList extends StatefulWidget {
@override
_ExpandableListState createState() => _ExpandableListState();
}
class _ExpandableListState extends State<ExpandableList> {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: new Scaffold(
body: new ListView.builder(
itemCount: 20,
itemBuilder: (context, i) {
return new ExpansionTile(
title: new Text('item$i', style: new TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold, fontStyle: FontStyle.italic),),
children: <Widget>[
new Column(
children: [TextField(),
Row(
children: [
IconButton(icon: Icon(Icons.update), onPressed: null),
IconButton(icon: Icon(Icons.remove), onPressed: null),
IconButton(icon: Icon(Icons.cancel), onPressed: null)
],
)],
),
],
);
},
),
),
);
}
}
我的要求是在我(仅)单击的项目下方获取该卡,否则不应使用该项目列表进行预构建。
解决方案
推荐阅读
- azure-devops - 禁用 AzureFileCopy@2 预作业?
- javascript - 如何在css中重新启动组动画?
- javascript - 加载 JSON API 数据的特定部分
- excel - VBA 扩展范围
- hibernate - 使用 Spring Boot 2.1+ 为 Hibernate 配置缓存
- javascript - Typescript - 如何在不使用 Exclude<> 的情况下从泛型类型中排除类型?
- ssl - 鱿鱼和其他 SSL_ports
- node.js - 安装 Node.js 后,'npm' 未被识别为内部或外部命令、可运行程序或批处理文件 - Windows
- java - 为什么在构造函数创建之前没有初始化实例变量。如果它们在类加载本身时被初始化会发生什么
- amazon-web-services - 在 aws sagemaker 中为多个数据集托管多个模型