just_debounce_it 1.0.4 copy "just_debounce_it: ^1.0.4" to clipboard
just_debounce_it: ^1.0.4 copied to clipboard

outdatedDart 1 only

A simple debounce library

just_debounce_it #

Build Status

A simple debounce library.

import 'package:just_debounce_it/just_debounce_it.dart';

Debounce.milliseconds(1000, print, ["Debounce World!"]);

Static methods #

There are three methods available for debouncing:

Debounce.seconds(int timeoutSeconds, Function target, [List<dynamic> args])
Debounce.milliseconds(int timeoutMs, Function target, [List<dynamic> args])
Debounce.duration(Duration timeout, Function target, [List<dynamic> args])

All methods differ only by the first parameter used to specify timeout values in different formats.

Example #

A quick demonstration can be found in the example directory. To run the example:

pub run example/main.dart

Credits

https://gist.github.com/marc-hughes/8302149