add_remove_continuous_pressure package

The add_remove_continuous pressure package allows you to add a widget that contains an increment button, a decrease button, and a widget that displays the value. You can increment or decrease the number by continuous pressing or by single clicking. The package also provides you with a function that is executed when the continuous click or single click event ends. This function returns the value generated by the event.

Features

  1. constant pressure.
  2. Single pressure.
  3. Function that returns the value when the click event ends.

Getting started

TODO: List prerequisites and provide or point to information on how to start using the package.

Usage

import 'package:add_remove_continuous_pressure/add_remove_continuous_pressure.dart';
import 'package:flutter/material.dart';

void main() {
  runApp(
    MaterialApp(
      home: Material(
        child: AddRemove(
          min: 1,
          max: 10,
          data: 20,
          speed: 500,
          spacing: 8,
          expanded: false,
          childAdd: Text("Add"),
          axis: Axis.horizontal,
          childRemove: Text("Remove"),
          event: (data) => print(data),
          childNumber: (data) => Text(data),
        ),
      ),
    ),
  );
}