fabrik_utils library

Classes

Debounce<T>
Debounce utility that executes a function only after a pause in rapid repeated calls.
FabrikCasing
A helper class for converting strings into various casing styles.
Throttle<T>
A type-safe, stream-backed throttler to limit the execution of a function within a specified duration.

Enums

DebounceStatus
Debounce status
ThrottleStatus
Throttling status

Extensions

DateTimeX on DateTime
Extension methods on DateTime for commonly used formatted date strings.
NullableStringX on String?
Extension on String? to add null and blank checks.
StringX on String
Extension on String to easily access Fabrik casing styles and other helpers.

Functions

formatDuration(Duration duration, {bool alwaysShowHours = false}) String
Formats a Duration into a readable string.
isApproachingScrollEnd(ScrollController controller, {double scrollOffsetThreshold = 0.7}) bool
Determines whether the user has scrolled close to the bottom of a scrollable list.
splitDuration(int totalSeconds) → ({String hours, String minutes, String seconds})
Converts an integer duration in seconds into a (HH, mm, ss) tuple of padded strings.