TODO: Put a short description of the package here that helps potential users know whether this package might be useful for them.

About

CommonStreamUtils extends the capabilities of Dart Streams and RxDart.

Dart comes with decent and powerful Streams API out-of-the-box,but they are clumsy to implement some features like:debounce态throttle

Now you can use it easily and gracefully in just one line of code!

Getting started

šŸŒ¹šŸŒ¹Please click the šŸ‘thumb up button, Let's Make Flutter Easy Again!

Features

FunctionPurpose
ThrottleWait for changes to stop before notifying.
DebounceNotifies once per Duration for a value that keeps changing.

Usage

For Example: throttle user button click down to 1000milliseconds(1 click per second)

                  onPressed: () {
CommonStreamUtils.throttleFunction(() {
   InviteDialog.show()
},milliseconds: 1000);
},

For Example: debounce user button click down to 1000milliseconds(1 click per second)

                  onPressed: () {
CommonStreamUtils.debounceFunction(() {
   InviteDialog.show()
},milliseconds: 1000);
},

Additional information

TODO: Tell users more about the package: where to find more information, how to contribute to the package, how to file issues, what response they can expect from the package authors, and more.

Libraries

debounce_throttle_function