letsar / flutter_slidable

A Flutter implementation of slidable list item with directional slide actions.
MIT License
2.73k stars 591 forks source link

Not close when enclosed in an inner ListView. #497

Open magic3584 opened 3 months ago

magic3584 commented 3 months ago

flutter_slidable: 3.1.1

@override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Container(
        child: ListView.builder(
            itemCount: 3,
            itemBuilder: (context, index) {
              return Column(
                children: [
                  Text("Header"),
                  ListView.builder(
                      itemCount: 3,
                      shrinkWrap: true,
                      physics: NeverScrollableScrollPhysics(),
                      itemBuilder: ((context, index) {
                        return Slidable(
                          endActionPane:
                              ActionPane(motion: DrawerMotion(), children: [
                            SlidableAction(
                              label: "Delete",
                              onPressed: (context) {},
                            )
                          ]),
                          child: Container(
                            width: double.infinity,
                            height: 40,
                            child: Text("data"),
                          ),
                        );
                      })),
                ],
              );
            }),
      ),
    );
  }