Flutter ExpansionPanelList 去除展开后的间隔距离,及属性

可展开列表中,展开后条目有一个间距,可以 使用materialGapSize: 0,来去掉

Dart 复制代码
// child: ExpansionPanelList(
      //expandedHeaderPadding: EdgeInsets.zero,//头部顶部间隔
      //    materialGapSize: 15,//展开后的间距
      //   animationDuration: const Duration(milliseconds: 300), //动画时间
    // dividerColor: Colors.white 分割颜色
        // elevation: 1 阴影
      //   expansionCallback: (index, bool) {
      //     setState(() {
      //       expandStateList[index].isOpen = !expandStateList[index].isOpen;
      //     });
      //   },
      //   children: expandStateList.map((e) {
      //     return ExpansionPanel(
      //         canTapOnHeader: true,
      //         headerBuilder: (context, isExpanded) {
      //           return Text(
      //             e.title,
      //           );
      //         },
      //         body: Text('内容'),
      //         isExpanded: e.isOpen);
      //   }).toList(),
      // ),
相关推荐
花燃柳卧33 分钟前
跨平台路由组件工程源码补充上传
android·flutter·kotlin
心中有国也有家2 小时前
E-Brufen 技术选型全景:Flutter + 鸿蒙 + Hive CE
hive·hadoop·学习·flutter·华为·harmonyos
Mandy的名字被占用了4 小时前
Dart 与 Flutter 快速入门指南
后端·flutter·dart
心中有国也有家8 小时前
Flutter 鸿蒙编译与构建流程深度解析
学习·flutter·华为·harmonyos
心中有国也有家1 天前
使用 DevEco Studio 配置 Flutter 鸿蒙签名
学习·flutter·华为·harmonyos
nice先生的狂想曲1 天前
Stream与StreamController以及对应的使用场景
flutter·客户端
心中有国也有家1 天前
鸿蒙Flutter开发环境从零搭建教程(Windows/macOS双平台·避坑版)
学习·flutter·华为·harmonyos
心中有国也有家1 天前
Flutter 鸿蒙适配第一步:从 hive 迁移到 hive\_ce
hive·学习·flutter·华为·harmonyos
心中有国也有家1 天前
AtomGit Flutter 鸿蒙客户端:E-Brufen 架构设计
学习·flutter·华为·harmonyos
心中有国也有家1 天前
鸿蒙 Flutter 本地存储实战:Hive CE 从入门到精讲
人工智能·hive·flutter·华为·harmonyos