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 can i do to increment the size of the text in Slidable.? #439

Open
kessler428 opened this issue Sep 19, 2023 · 2 comments
Open

How can i do to increment the size of the text in Slidable.? #439

kessler428 opened this issue Sep 19, 2023 · 2 comments

Comments

@kessler428
Copy link

kessler428 commented Sep 19, 2023

This is my Code:

` Expanded(
child: Container(
height: widget.bookmark.pages.length * 100,
color: Theme.of(context).colorScheme.baseLightGray,
child: ListView.builder(
scrollDirection: Axis.vertical,
itemCount: widget.bookmark.pages.length,
itemBuilder: (context, index) {

              return Slidable(
                key: const ValueKey(0),
                endActionPane: ActionPane(
                  motion: const ScrollMotion(),
                  children: [
                    SlidableAction(
                      backgroundColor: Theme.of(context).colorScheme.baseRed,
                      foregroundColor: Colors.white,
                      label: 'Delete',
                      flex: 1,
                      onPressed: (BuildContext context) {  },
                    ),
                  ],
                ),
                
                child:CardPageWidget(
                  page: widget.bookmark.pages[index]
                )
              );
            }
          ),
        ),
      ),`

This is how that code looks like:

Screenshot 2023-09-19 at 3 51 33 PM

And I didn't find how I can increase the font size of the text.

So, another question that i have is if i can reduce the width of the red Background, i read the documentation and i coud'tn find anything, thanks.

@ghost
Copy link

ghost commented Oct 3, 2023

Slidable(
endActionPane: ActionPane(
extentRatio: 0.2, // In this section you can determine the width of the red area.
)

@hustlemickey
Copy link

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