• This project
    • Loading...
  • Sign in

flutter_package / fluttertpc_get

Go to a project
Toggle navigation
  • Projects
  • Groups
  • Snippets
  • Help
Toggle navigation pinning
  • Project
  • Activity
  • Repository
  • Pipelines
  • Graphs
  • Issues 0
  • Merge Requests 0
  • Wiki
  • Network
  • Create a new issue
  • Builds
  • Commits
  • Files
  • Commits
  • Network
  • Compare
  • Branches
  • Tags
Switch branch/tag
  • fluttertpc_get
  • lib
  • src
  • state_manager
  • rx
  • utils
  • debouncer.dart
  • upgrade to 3.4.1 · 60d85e12
    60d85e12 Browse Files
    Jonatas authored 2020-07-27 05:36:37 -0300
debouncer.dart 205 Bytes
Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11 12 13
import 'dart:async';

class Debouncer {
  final Duration delay;
  Timer _timer;

  Debouncer({this.delay});

  call(void Function() action) {
    _timer?.cancel();
    _timer = Timer(delay, action);
  }
}