• 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
  • rx
  • utils
  • debouncer.dart
  • Bump to new Get! · 8a2e13e3
    8a2e13e3 Browse Files
    Jonny Borges authored 2020-05-31 19:06:42 -0300
debouncer.dart 198 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(Function action) {
    _timer?.cancel();
    _timer = Timer(delay, action);
  }
}