Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Style problem #450

Open
daizhun opened this issue Dec 13, 2023 · 2 comments
Open

Style problem #450

daizhun opened this issue Dec 13, 2023 · 2 comments

Comments

@daizhun
Copy link

daizhun commented Dec 13, 2023

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

@daizhun
Copy link
Author

daizhun commented Dec 13, 2023

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

@hustlemickey
Copy link

hustlemickey commented Jan 6, 2024

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,
          ),
        ],
      ),```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants