tp7309 / flutter_sticky_and_expandable_list

粘性头部与分组列表Sliver实现 Build a grouped list, which support expand/collapse section and sticky headers, support use it with sliver widget.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

展开一个Header#0 滑动一点点, 然后展开第二个的时候,Header#1时候,展开不是现实的第一个ListTitle#0这条数据

yj229201093 opened this issue · comments

xin

Hello, I have a situation here. I'm going to expand one Header#0 by sliding a little bit, and then I'm going to expand the second one, and then I'm going to expand the first ListTitle#0 that's not actually real, and occasionally I'm going to flash. Don't know how to solve this?

demo Repetition can be

您好,我这边出现这种情况。展开一个Header#0 滑动一点点, 然后展开第二个的时候,Header#1时候,展开不是现实的第一个ListTitle#0这条数据,偶尔还有闪屏的情况。不知道这个怎么解决?

demo可复现

flutter 2.5.3, sticky_and_expandable_list: ^1.0.2

我晚上回去看下

好的 谢谢大佬

找到了原因,我这两天想下怎么修改。

谢谢大佬。
还有请教下,有一个这样的场景。点击一个展开,其他都关闭。(每次只展开一个)。如果点击Header#5的话,Header#5展开,Header#5内容滑动到最顶部展开子组件。 这个扩展加属性好解决吗?

示例:

Widget _buildHeader(
      BuildContext context, ExpandableSectionContainerInfo containerInfo) {
    ExampleSection section = sectionList[containerInfo.sectionIndex];
    return Builder(builder: (context1) {
      return InkWell(
          child: Container(
              color: Colors.lightBlue,
              height: 48,
              padding: EdgeInsets.only(left: 20),
              alignment: Alignment.centerLeft,
              child: Text(
                section.header,
                style: TextStyle(color: Colors.white),
              )),
          onTap: () {
            //toggle section expand state
            setState(() {
              sectionList.forEach((element) {
                element.setSectionExpanded(element == section);
              });
              WidgetsBinding.instance!.addPostFrameCallback((timeStamp) {
                Scrollable.ensureVisible(context1,
                    duration: Duration(milliseconds: 300));
              });

            });

          });
    });
  }

好的 谢谢!
这个问题:展开一个Header#0 滑动一点点, 然后展开第二个的时候,Header#1时候,展开不是现实的第一个ListTitle#0这条数据,偶尔还有闪屏的情况。这个原因是什么?好修改吗? 因为这个插件很好用。辛苦大佬

上面的写法也能解决第一个问题吧?你试下,框架里适配周末会腾出时间看

尝试了,还不能解决。还是一样。 不知道什么原因。

大佬 方便给一个联系方式请教一些问题不?