flutter_debouncing_controllers 0.0.2
flutter_debouncing_controllers: ^0.0.2 copied to clipboard
Debouncing variants of flutter controllers.
flutter_debouncing_controllers #
Debouncing variants of flutter controllers.
Controllers that are intended to be drop-in replacements:
/// before:
final textController = TextController()
..addListener(_onTextChange);
/// after:
final textController = DebouncingTextController()
..addListener(_onTextChange);
/// before:
final searchController = SearchController()
..addListener(_onSearchChange);
/// after:
final searchController = DebouncingSearchController()
..addListener(_onSearchChange);
Simple change notifier:
final debouncingNotifier = DebouncingChangeNotifier()
..addListener(_onChange);
/// [_onChange] is called only once.
debouncingNotifier.change();
debouncingNotifier.change();
debouncingNotifier.change();