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(),
      // ),
相关推荐
末代iOS程序员华仔7 小时前
Guideline 5.6 - Developer Code of Conduct
flutter·ios·swift
恋猫de小郭9 小时前
聊个比较有意思的 Flutter Web 问题
android·前端·flutter
2501_915918419 小时前
Flutter项目配置iOS混淆的详细步骤与工具推荐
android·flutter·ios·小程序·uni-app·cocoa·iphone
天空之城--9 小时前
过去一周Android行业动态:编码技术与综合趋势精选
android·flutter·性能优化·kotlin·android jetpack
Flutter OH1 天前
Flutter OH平台 DFX 问题定位导航
flutter
恋猫de小郭1 天前
AI 时代,也许你的 Flutter 需要一套 Dartastic OpenTelemetry 监控
android·前端·flutter
等....1 天前
Flutter创建
flutter
Privasa-隐私实验室1 天前
跨端技术选型|Flutter搭建隐私加密App,安卓与iOS双端差异适配实战
android·笔记·安全·flutter·ios·隐私安全·aes-256
Flutter OH2 天前
Flutter OH 外接纹理问题定位指南
flutter
未来猫咪花2 天前
Everything is ViewModel:让状态管理回到对象世界
android·flutter·ios