slidable in flutter

 slidable in flutter

Code - Package Page

Padding(
              padding: EdgeInsets.all(10),
              child: Slidable(
                startActionPane: ActionPane(motion: StretchMotion(), children: [
                  SlidableAction(
                    onPressed: ((context) {}),
                    backgroundColor: Colors.green,
                    icon: Icons.block,
                  ),
                ]),
                endActionPane: ActionPane(motion: StretchMotion(), children: [
                  SlidableAction(
                    flex: 2,
                    onPressed: ((context) {}),
                    backgroundColor: Colors.blue,
                    icon: Icons.call,
                  ),
                ]),
                child: Container(
                  decoration: BoxDecoration(
                    borderRadius: BorderRadius.circular(10),
                    color: Colors.deepPurple.shade300,
                  ),
                  child: const ListTile(
                    title: Text("Nitish Kumar"),
                    subtitle: Text("7033161175"),
                    leading: Icon(
                      Icons.book,
                      size: 40,
                    ),
                    iconColor: Colors.amber,
                  ),
                ),
              ),
            )

Post a Comment

Previous Post Next Post