slidable_button 1.0.1 copy "slidable_button: ^1.0.1" to clipboard
slidable_button: ^1.0.1 copied to clipboard

outdated

A simple flutter plugin for Slidable Button.

slidable_button #

Pub support

A simple flutter plugin for Slidable Button.

![](https://github.com/husainazkas/slidable_button/blob/master/screenshot/1.gif | width=300) ![](https://github.com/husainazkas/slidable_button/blob/master/screenshot/2.gif | width=300)

Note : This plugin is cloned and remade from swipe_button.

Getting Started #

Add dependency #

dependencies:
  slidable_button: ^1.0.1

Simple to use #

import 'package:slidable_button/slidable_button.dart';
    SlidableButton(
      width: MediaQuery.of(context).size.width / 3,
      buttonWidth: 60.0,
      color: Theme.of(context).accentColor.withOpacity(0.5),
      buttonColor: Theme.of(context).primaryColor,
      dismissible: false,
      label: Center(child: Text('Slide Me')),
      child: Padding(
        padding: const EdgeInsets.all(8.0),
        child: Row(
          mainAxisAlignment: MainAxisAlignment.spaceBetween,
          children: [
            Text('Left'),
            Text('Right'),
          ],
        ),
      ),
      onChanged: (position) {
        setState(() {
          if (position == SlidableButtonPosition.right) {
            result = 'Button is on the right';
          } else {
            result = 'Button is on the left';
          }
        });
      },
    ),
63
likes
0
pub points
94%
popularity

Publisher

unverified uploader

A simple flutter plugin for Slidable Button.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on slidable_button