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

How to define custom height? #462

Open
sidh41 opened this issue Feb 7, 2024 · 2 comments
Open

How to define custom height? #462

sidh41 opened this issue Feb 7, 2024 · 2 comments

Comments

@sidh41
Copy link

sidh41 commented Feb 7, 2024

Code:

Slidable(
            // The end action pane is for actions when sliding from right to left
            endActionPane: ActionPane(
              motion: const DrawerMotion(),
              children: [
                SlidableAction(
                  autoClose: true,
                  onPressed: (_) => _deleteTodo(index),
                  backgroundColor: dangerColor,
                  icon: Icons.delete,
                  label: 'Delete',
                  spacing: 8,
                ),
              ],
            ),
         );
            

Ouput:
image

Expectation: I should able to define custom height.

@sidh41 sidh41 changed the title I'm not able to define custom height How to define custom height? Feb 7, 2024
@Josenildo4caju
Copy link

Josenildo4caju commented Apr 26, 2024

use ''extedRation'' and choose the percentage that the button will use.
image

@JannieT
Copy link

JannieT commented Jul 9, 2024

I had this issue when I used a ListTile as my list item. My fix was to replace the ListTile with a GestureDetector > Container. Now the slidable drawer had the same height as the list item, but it removed the vertical spacing between items. So I also replaced my ListView.builder with a ListView.separated to re-introduce the gap between list items.

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

3 participants