utils/u_utils
library
Classes
-
UDebouncer
-
Runs only the last call after a quiet delay, e.g. search-as-you-type.
final UDebouncer d = UDebouncer(delay: 400.ms); d.run(search);
-
URetry
-
Retries a failing async job with growing waits (1s, 2s, 4s…).
await URetry.run(() => api.load(), attempts: 3)
-
UThrottler
-
Runs at most once per interval, e.g. a button that must not fire twice.
final UThrottler t = UThrottler(interval: 1.seconds); t.run(pay);
-
UUUID
-
Makes UUIDs (RFC 9562) with no package; v4 random and v7 time-sorted are the usual picks.
UUUID.uuidV4()
-
UValidators
-
Ready-made form validators; each returns a FormFieldValidator for
validator:. UTextField(validator: UValidators.email())
Functions
-
delay(int milliseconds, VoidCallback action)
→ Future<void>
-
Runs
action after milliseconds. delay(500, () => print("later"))