flutter_debounce_throttle_riverpod 1.0.2 copy "flutter_debounce_throttle_riverpod: ^1.0.2" to clipboard
flutter_debounce_throttle_riverpod: ^1.0.2 copied to clipboard

Riverpod integration for flutter_debounce_throttle. EventLimiterController auto-disposes with Ref lifecycle. Zero boilerplate.

flutter_debounce_throttle_riverpod #

pub package License: MIT

Riverpod integration for flutter_debounce_throttle.
EventLimiterController ties debounce/throttle timers to a Riverpod Ref lifecycle — zero boilerplate, auto-cleanup on provider dispose.

Debounced Search Notifier Provider Auto-Dispose
Riverpod Search Auto-Dispose

Why this package? #

Most debounce/throttle solutions either cause memory leaks (manual Timer) or require 20+ lines of boilerplate in your Notifier. This package reduces it to 1 line while ensuring perfect memory safety.


Installation #

dependencies:
  flutter_debounce_throttle_riverpod: ^1.0.0

Quick start #

@riverpod
class SearchNotifier extends _$SearchNotifier {
  late final EventLimiterController _limiter;

  @override
  SearchState build() {
    // ✅ 1 line: auto-disposes with provider
    _limiter = ref.eventLimiter(); 
    return SearchState.initial();
  }

  void onSearch(String query) {
    _limiter.debounce('search', () async {
      state = SearchState.loading();
      state = SearchState.data(await api.search(query));
    });
  }
}

Quality Assurance #

Guarantee How
570+ tests Battle-tested core (verified in all UI packages)
Lifecycle-safe Tied to Ref.onDispose() — zero manual cleanup
Async Support Handles Futures, cancellation, and race conditions

Which Package? #

You are building... Package
Flutter app + Riverpod flutter_debounce_throttle_riverpod ← you are here
Flutter app + hooks flutter_debounce_throttle_hooks
Flutter app (most users) flutter_debounce_throttle

GitHub · FAQ · API Reference

Made with craftsmanship by Brewkits

1
likes
160
points
129
downloads

Documentation

API reference

Publisher

verified publisherbrewkits.dev

Weekly Downloads

Riverpod integration for flutter_debounce_throttle. EventLimiterController auto-disposes with Ref lifecycle. Zero boilerplate.

Repository (GitHub)
View/report issues
Contributing

Topics

#debounce #throttle #riverpod #state-management #async

License

MIT (license)

Dependencies

dart_debounce_throttle, meta, riverpod

More

Packages that depend on flutter_debounce_throttle_riverpod