Skip to content

kyleb-app/swipe_left

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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"),
                      ],
                    )
                )
            )

About

A Swipe Left button plugin for Flutter

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published