increment_button 0.1.0 copy "increment_button: ^0.1.0" to clipboard
increment_button: ^0.1.0 copied to clipboard

Slide the button to change value.

increment_button #

Pub

A simple flutter plugin for Slidable Button.

 

Getting Started #

Add dependency #

dependencies:
  increment_button : 0.1.0

Simple to use #

import 'package:increment_button/increment_button.dart';

Code:

    IncrementButton(
        width: MediaQuery.of(context).size.width,
        buttonWidth: 45.0,
        color: Theme.of(context).colorScheme.secondary.withOpacity(0.5),
        buttonColor: Theme.of(context).primaryColor,
        label: Center(child: Text('🏀')),
        onDelta: (change) {
        setState(() {
            delta = change;
            i = i + change;
            result = 'New value is $i ';
        });
        },
    ),

Demo of the component:

 

based on : https://github.com/husainazkas/slidable_button