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(),
      // ),
相关推荐
tangweiguo030519873 小时前
Flutter 分页列表页面实现指南
flutter
恋猫de小郭6 小时前
Android Studio Panda 3 发布,CMP 导致的 Gemini 输入问题
android·ide·flutter·ios·android studio
jian110586 小时前
flutter 配置一次,第二次就失败,command not found: flutter,配置一次成功一次,第二次就失败
flutter
2501_920627617 小时前
Flutter 框架跨平台鸿蒙开发 - 数据库学习助手
数据库·学习·flutter·华为·harmonyos
2501_920627618 小时前
Flutter 框架跨平台鸿蒙开发 - 编程代码库应用
学习·算法·flutter·华为·harmonyos
芙莉莲教你写代码8 小时前
Flutter 框架跨平台鸿蒙开发 - 疫苗接种记录
flutter·华为·harmonyos
芙莉莲教你写代码9 小时前
Flutter 框架跨平台鸿蒙开发 - 步数追踪器
flutter·华为·harmonyos
2501_920627619 小时前
Flutter 框架跨平台鸿蒙开发 - 算法可视化应用
算法·flutter·华为·harmonyos
芙莉莲教你写代码9 小时前
Flutter 框架跨平台鸿蒙开发 - 家庭购物清单
flutter·华为·harmonyos
m0_6515939112 小时前
从工业5.0到实战:一个智能仓库管理系统的设计与Flutter优化
flutter