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(),
      // ),
相关推荐
liulian09161 天前
Flutter 网络状态与内容分享库:connectivity_plus 与 share_plus 的 OpenHarmony 适配指南
网络·flutter
KKei16381 天前
Flutter for OpenHarmony 学习视频播放器技术文章
学习·flutter·华为·音视频·harmonyos
KKei16381 天前
Flutter for OpenHarmony 健身计划与运动打卡APP
flutter·华为·harmonyos
KKei16381 天前
Flutter for OpenHarmony 在线考试与自测系统APP技术文章
flutter·华为·harmonyos
liulian09161 天前
Flutter 依赖注入与设备信息库:get_it 与 device_info_plus 的 OpenHarmony 适配指南
flutter
KKei16381 天前
Flutter for OpenHarmony学习目标追踪应用技术文章
学习·flutter·华为·harmonyos
KKei16382 天前
Flutter for OpenHarmony 编程技能树APP技术文章
flutter·华为·harmonyos