Skip to content

Instantly share code, notes, and snippets.

@Klerith
Last active February 22, 2025 03:09
Show Gist options
  • Save Klerith/62b00635acec3614d2b35c066df724e6 to your computer and use it in GitHub Desktop.
Save Klerith/62b00635acec3614d2b35c066df724e6 to your computer and use it in GitHub Desktop.
Flutter: Debouncer manual
import 'dart:async';
// Creditos
// https://stackoverflow.com/a/52922130/7834829
class Debouncer<T> {
Debouncer({
required this.duration,
this.onValue
});
final Duration duration;
void Function(T value)? onValue;
T? _value;
Timer? _timer;
T get value => _value!;
set value(T val) {
_value = val;
_timer?.cancel();
_timer = Timer(duration, () => onValue!(_value!));
}
}
@Jorgeamayapabon
Copy link

Muchas gracias Fernando.

@Gricardov
Copy link

Es el mejor profesor de todoss

@CRUXsur
Copy link

CRUXsur commented Feb 18, 2022

Gracias Fernando.

@valinor33
Copy link

#Flutter <3

@alvherrey
Copy link

Gracias Fernando

@DmitryFlow
Copy link

Muchas gracias Fernando!

@AmadorDev
Copy link

bien profeeee

@R7MM1805
Copy link

Gracias!!

@santialejo97
Copy link

Muchas gracias Fernando.

@otto2099
Copy link

otto2099 commented Aug 3, 2022

Buena herramienta.

@andreneri2004
Copy link

Obrigado Professor, estou aprendendo muito com o seu curso. Brasil

@rainclaudio
Copy link

buena maestro

@chicho69-cesar
Copy link

Que grande !!!

@eliasbest07
Copy link

Genial

@SebastianQuis
Copy link

Grande Fer!

@Luiscorrea23
Copy link

Fenomenal!!!

@qbixmex
Copy link

qbixmex commented Nov 26, 2022

Gracias por tu aportación

@jmfos
Copy link

jmfos commented Dec 5, 2022

Gracias Fernando, eres grande!

@LuisECCespedes
Copy link

Gran aportación.

@hardworld089
Copy link

Gracias Fernando!!!

@Willyrr-55
Copy link

Gracias Fernando!

@avielLV
Copy link

avielLV commented Jan 25, 2023

Gracias!!!

@LFrancoF
Copy link

LFrancoF commented Feb 20, 2023

Thanks Fernando :')

@gpalleschi
Copy link

Muchas Gracias Fernando !!!!!

@freedomCruz
Copy link

Super entretenidos tus cursos. Gracias Fernando!!!

@AngieMeliss
Copy link

Muchas gracias Fer, eres un teso, aprendo demasiado de vos <3

@AndresH11
Copy link

Muchas gracias

@BryanAlex
Copy link

Muchas gracias Fernando. No dejo de aprender con vos.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment