flutter_slidable icon indicating copy to clipboard operation
flutter_slidable copied to clipboard

Style problem

Open daizhun opened this issue 1 year ago • 3 comments

How do I change the width of the SlidableAction when there is only one button

daizhun avatar Dec 13 '23 02:12 daizhun

SlidableAction( spacing:10, // flex: 1, onPressed: (_) { Log.main.info("奥力给");}, backgroundColor: Color(0xFFF77B7B), foregroundColor: Colors.white, label: '取消关注', ), I can't change the width when I use the spacing property

daizhun avatar Dec 13 '23 03:12 daizhun

change extentRatio value, it means 0.2 * full width

 endActionPane: ActionPane(
        extentRatio: 0.2,
        motion: const ScrollMotion(),
        children: [
          SlidableAction(
            onPressed: (context) {
              controller.delete(item.id);
            },
            backgroundColor: Colors.red,
            foregroundColor: Colors.white,
            label: "Delete",
            padding: EdgeInsets.zero,
          ),
        ],
      ),```

hustlemickey avatar Jan 06 '24 04:01 hustlemickey