flutter_slidable icon indicating copy to clipboard operation
flutter_slidable copied to clipboard

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

Open kessler428 opened this issue 1 year ago • 2 comments

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.

kessler428 avatar Sep 19 '23 21:09 kessler428

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

ghost avatar Oct 03 '23 06:10 ghost

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