swipe_left 0.0.3 copy "swipe_left: ^0.0.3" to clipboard
swipe_left: ^0.0.3 copied to clipboard

A Swipe Left button for Flutter

Swipe Left is a basic package that allows you to 'swipe left' on a widget, revealing either one or two buttons.

Features #

  • Swipe Left on any widget
  • Reveals either 1 or 2 buttons beneath the widget, with customizable actions for each button
  • All colors and sizes customizable

Getting started #

This package has no pre-requisites.

Usage #

SwipeLeft2Buttons(
                height: 75,
                backgroundColor: Colors.white,
                buttonFontSize: 12.0,
                buttonWidth: 75.0,
                button1Title: 'Info',
                button1BackgroundColor: Colors.blue,
                button1FontColor: Colors.white,
                button2Title: 'Delete',
                button2BackgroundColor: Colors.red,
                button2FontColor: Colors.white,
                button1Action: () {
                  // your action code here
                },
                button2Action: () {
                  // your action code here
                },
                child: Container(
                    height: 75,
                    width: MediaQuery.of(context).size.width,
                    decoration: BoxDecoration(
                        color: Colors.white,
                        border: Border(
                            bottom: BorderSide(width: 1, color: Color(0xFFe0e0e0))
                        )
                    ),
                    child: Row(
                      mainAxisAlignment: MainAxisAlignment.spaceBetween,
                      children: [
                        Icon(Icons.account_balance),
                        Text("My Swipe Left Button"),
                      ],
                    )
                )
            )
SwipeLeft(
                height: 75,
                buttonFontSize: 12.0,
                buttonWidth: 75.0,
                backgroundColor: Colors.white,
                buttonTitle: 'Delete',
                buttonBackgroundColor: Colors.red,
                buttonFontColor: Colors.white,
                buttonAction: () {
                  // your action code here
                },
                child: Container(
                    height: 75,
                    width: MediaQuery.of(context).size.width,
                    decoration: BoxDecoration(
                        color: Colors.white,
                        border: Border(
                            bottom: BorderSide(width: 1, color: Color(0xFFe0e0e0))
                        )
                    ),
                    child: Row(
                      mainAxisAlignment: MainAxisAlignment.spaceBetween,
                      children: [
                        Icon(Icons.account_balance),
                        Text("My Swipe Left Button"),
                      ],
                    )
                )
            )
1
likes
70
points
17
downloads

Publisher

unverified uploader

Weekly Downloads

A Swipe Left button for Flutter

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on swipe_left