flutter_helper_utils library

Classes

AsyncPaginator<T>
An asynchronous paginator that fetches pages using a provided fetchPage function.
BasePaginator<T>
Base class for paginators that provides shared logic, debouncing, and disposal checks.
Bidi
This provides utility methods for working with bidirectional text. All of the methods are static, and are organized into a class primarily to group them together for documentation and discoverability.
BidiFormatter
Bidi stands for Bi-directional text. According to Wikipedia: Bi-directional text is text containing text in both text directionalities, both right-to-left (RTL) and left-to-right (LTR). It generally involves text containing different types of alphabets, but may also refer to boustrophedon, which is changing text directionality in each row.
BoolNotifier
allows to quickly create a ValueNotifier of type bool.
Breakpoint
Base class for defining breakpoints.
BreakpointLayoutBuilder
BrightnessNotifier
ColorNotifier
allows to quickly create a ValueNotifier of type Color.
ConvertObject
A utility class for converting objects to different types.
CountrySearchService
A service class that performs country searches based on a query string.
DateFormat
DateFormat is for formatting and parsing dates in a locale-sensitive manner.
DatesHelper
DateTimeNotifier
create a ValueNotifier of type DateTime, which reacts just like normal DateTime, but with notifier capabilities.
Debouncer
A versatile debouncer that helps consolidate rapid events by scheduling actions to run after a delay. It features immediate execution, max-wait thresholds, pause/resume support, and reset functionality.
DebouncerState
An immutable snapshot of a debouncer's state.
DHUCountry
A class representing country information including names, codes, region, and other details.
DHUTimezone
A dart helper util class representing timezone information including the timezone name, raw offset, abbreviation, and daylight saving time (DST) offset.
DoubleNotifier
allows to quickly create a ValueNotifier of type double.
DoublyLinkedList<E>
A doubly linked list implementation in Dart.
DoublyLinkedListNotifier<E>
DurationNotifier
create a ValueNotifier of type Duration, which reacts just like normal Duration, but with notifier capabilities.
GradientWidget
A GradientWidget applies a gradient effect to its child widget and offers extensive customization options for blending, alignment, and opacity.
InfinitePaginator<T, C>
An infinite paginator that supports continuous loading of items.
Intl
The Intl class provides a common entry point for internationalization related tasks. An Intl instance can be created for a particular locale and used to create a date format via anIntl.date(). Static methods on this class are also used in message formatting.
IntNotifier
allows to quickly create a ValueNotifier of type int.
IPaginator<T>
Basic interface that any paginator should implement.
ListenablesBuilder
ListenablesBuilder
ListNotifier<E>
create a ValueNotifier of type List, which reacts just like normal List, but with notifier capabilities.
LRUCache<K, V>
A generic Least Recently Used (LRU) cache to store computed values (e.g. bigrams).
MapNotifier<K, V>
create a ValueNotifier of type Map, which reacts just like normal Map, but with notifier capabilities.
MultiTapDetector
A widget that detects multiple taps on its child within a specified duration.
Node<E>
A node in a doubly linked list.
NumberFormat
Provides the ability to format a number in a locale-specific way.
NumbersHelper
A utility class for numerical helper methods.
NumNotifier
allows to quickly create a ValueNotifier of type num. allows to quickly create a ValueNotifier of type num.
PaginationConfig
Configuration that allows tweaking retry logic, caching, and other pagination behaviors.
PaginationCursor<T>
A generic "cursor" used for cursor-based pagination.
Paginator<T>
Synchronous, in-memory paginator that paginates a provided list of items.
PausableStream<T>
PlatformEnv
A platform-independent class providing information about the operating system, with web compatibility considerations.
PlatformInfoLayoutBuilder
PlatformSizeInfo
Provides information about the current platform size and orientation.
PlatformTypeProvider
A widget that provides the current Breakpoint and Orientation to its descendants. Wrap this around the root of your application to make platform and orientation information available throughout the widget tree.
RenderSingleAxisWrap
The RenderObject that performs the “all or nothing” layout. It first attempts to lay out the children in the preferredDirection (for example, horizontally) by summing up their sizes plus the spacing. If that total exceeds the corresponding constraint, it re-lays them out in the alternate direction.
SetNotifier<E>
create a ValueNotifier of type Set, which reacts just like normal Set, but with notifier capabilities.
SingleAxisWrap
A widget that lays out its children either all in a row or all in a column, depending on whether they fit in the preferred (main) direction. For example, if preferredDirection is horizontal and the total width of the children plus spacing is within the parent’s maxWidth, then the children are arranged as a Row. Otherwise they are arranged as a Column. (The reverse applies when preferredDirection is vertical.)
SingleAxisWrapParentData
ParentData for RenderSingleAxisWrap.
StringNotifier
allows to quickly create a ValueNotifier of type String.
StringSimilarity
Main utility class for string similarity calculations, reporting, and batch processing.
StringSimilarityBuilder
Builder for StringSimilarityConfig.
StringSimilarityConfig
Configuration class for string similarity operations.
ThemeModeNotifier
ThemeWithoutEffects
A widget that optionally removes various visual feedback effects from its child subtree.
TimeUtils
A utility class that provides helper methods for working with time.
TypedListView<E>
A type-safe ListView that allows for easy customization with headers, footers, separators, and pagination.
UriNotifier
create a ValueNotifier of type Uri, which reacts just like normal Uri, but with notifier capabilities.

Enums

PageState
Describes the current loading state of a page.
RoundingMode
An enum representing the rounding mode used to compute the current item index.
SimilarityAlgorithm
Supported similarity algorithms for string comparison.

Mixins

PaginationAnalytics<T>
Mixin that provides analytics tracking for pagination operations.

Extensions

AsyncPaginatorTransform on AsyncPaginator<T>
Extension methods to transform fetched data in an AsyncPaginator.
BrightnessNotifierEx on ValueNotifier<Brightness>
DHUArchiveMimeChecksExtensions on String?
DHUArchiveMimeChecksExtensions
DHUAudioMimeChecksExtensions on String?
DHUAudioMimeChecksExtensions
DHUBidiStringExtensions on String
Provides extensions for String to support bidirectional text handling and manipulation.
DHUBidiTDExtensions on TextDirection?
Provides extensions for TextDirection to support bidirectional text formatting.
DHUBoolEx on bool
A set of extensions on the bool type to provide more functionality.
DHUBoolNullablelEx on bool?
A set of extensions on the nullable bool type to provide more functionality.
DHUCaseConversionExtensions on String
DHUCollectionsExtensions on Iterable<E>
Enhanced documentation for non-nullable Iterable extensions.
DHUCollectionsExtensionsNS on Iterable<E>?
Enhanced documentation for nullable Iterable extensions.
DHUContactMimeChecksExtensions on String?
DHUContactMimeChecksExtensions
DHUDateExtensions on DateTime
DHUDateExtensions
DHUDateFormatExtension on DateTime
extension DHUDateFormatExtension on DateTime
DHUDateFormatNStringExtension on String?
extension DHUDateFormatNStringExtension on String?
DHUDateFormatStringExtension on String
extension DHUDateFormatStringExtension on String
DHUDateNullString on String?
DHUDateNullString
DHUDateString on String
DHUDateString
DHUDocumentMimeChecksExtensions on String?
DHUDocumentMimeChecksExtensions
DHUDoubleExtensions on double
DHUDoubleExtensions
DHUDurationExt on Duration
DHUFontMimeChecksExtensions on String?
DHUFontMimeChecksExtensions
DHUHttpEx on num?
DHUHttpEx
DHUImageMimeChecksExtensions on String?
DHUImageMimeChecksExtensions
DHUIntExtensions on int
DHUIntExtensions
DHUIntlExtensions on String
DHUIntlNumExtensions
DHUIntlNumExtensions on num
on
DHUIterableDoubleExtensionsNS on Iterable<double?>?
Extension on nullable Iterable<double?> providing a total sum calculation.
DHUIterableIntExtensionsNS on Iterable<int?>?
Extension on nullable Iterable<int?> providing a total sum calculation.
DHUIterableNumExtensionsNS on Iterable<num?>?
Extension on nullable Iterable<num?> providing a total sum calculation.
DHUListDoubleStats on Iterable<double>
Extension on Iterable<double> providing statistical operations.
DHUListIntStats on Iterable<int>
Extension on Iterable<int> providing statistical operations.
DHUListNumStats on Iterable<num>
Extension on Iterable<num> providing statistical operations.
DHUMapExt on Map<K, V>
DHUMapExt
DHUMapExtension on Map<K, V>
DHUMapExtension
DHUMapNullableExtension on Map<K, V>?
DHUMapNullableExtension
DHUMimeChecksExtensions on String?
DHUMimeChecksExtensions
DHUNDateFormatExtension on DateTime?
extension DHUNDateFormatExtension on DateTime?
DHUNullableDateExtensions on DateTime?
DHUNullableDateExtensions
DHUNullableListExtensions on List<E>?
Enhanced documentation for nullable List extensions.
DHUNullableSetExtensions on Set<E>?
Extension methods for nullable Set collections.
DHUNullSafeCaseConversionExtensions on String?
DHUNullSafeNumExtensions on num?
DHUNullSafeNumExtensions
DHUNullSafeStringExtensions on String?
DHUNullSafeURIExtensions on String?
Extensions for nullable String to convert to Uri
DHUNumberFormatExtensions on num
DHUNumberFormatNullableStringExtensions on String?
DHUNumberFormatStringExtensions on String
DHUNumExtensions on num
DHUNumExtensions
DHUObjectConvert on Object
DHUObjectNullableExtensions on Object?
DHUObjectTryConvert on Object?
DHUProgrammingMimeChecksExtensions on String?
DHUProgrammingMimeChecksExtensions
DHUStringExtensions on String
DHUUriEx on Uri
Extensions for Uri utils and manipulation.
DHUURIExtensions on String
Extensions for String to convert to Uri
DHUVideoMimeChecksExtensions on String?
DHUVideoMimeChecksExtensions
FHUAlignExtensions on Widget
FHUAsyncSnapshot on AsyncSnapshot<T>
Extension on AsyncSnapshot<T> that provides convenient utilities for checking snapshot states.
FHUBoolNotifierEx on bool
Extension on bool to provide easy access to creating a ValueNotifier for boolean values.
FHUBoolValueNotifierExtension on ValueNotifier<bool>
BoolValueNotifierExtension
FHUBrightnessExtension on Brightness?
FHUBrightnessNotifierEx on Brightness
Extension on Brightness to provide easy access to creating a ValueNotifier for Brightness.
FHUBuildContextPlatformExtension on BuildContext
Extension methods on BuildContext for easy access to Breakpoint and Orientation.
FHUCarouselControllerExtension on CarouselController
An extension on CarouselController that provides a comprehensive API for controlling carousel scroll behavior.
FHUColorExt on Color
An extension on Color that provides a variety of color-manipulation helpers.
FHUColorNotifierEx on Color
Extension on Color to provide easy access to creating a ValueNotifier for Color objects.
FHUColorSchemeEx on ColorScheme
FHUColorValueNotifierExtension on ValueListenable<Color>
Extension: ColorValueNotifierExtension
FHUConnectionState on ConnectionState
Extension on ConnectionState providing utility properties for checking the connection state.
FHUContextDirectionality on BuildContext
Extension methods for accessing text directionality from a BuildContext.
FHUDateTimeNotifierEx on DateTime
Extension on DateTime to provide easy access to creating a ValueNotifier for DateTime objects.
FHUDirectionalIterable on Iterable<T>
Extension for RTL-aware list operations.
FHUDoubleNotifierEx on double
Extension on double to provide easy access to creating a ValueNotifier for double values.
FHUDoubleValueNotifierExtension on ValueListenable<double>
DoubleValueNotifierExtension
FHUDoublyLinkedListNotifierEx on DoublyLinkedList<E>
Extension on DoublyLinkedList<E> to provide easy access to creating a ValueNotifier for doubly linked lists.
FHUFocusScopeExtension on BuildContext
FHUFuture on Future<T>
Extension on Future<T> that provides useful utilities and shortcuts for productivity.
FHUIntNotifierEx on int
Extension on int to provide easy access to creating a ValueNotifier for integer values.
FHUIntValueNotifierExtension on ValueListenable<int>
IntValueNotifierExtension
FHUIterableNotifierEx on Iterable<E>
Extension on Iterable<E> to provide easy access to creating various ValueNotifier instances.
FHUListenableExtension on Listenable
Extension on Listenable to integrate with ListenableBuilder.
FHUListenablesExtension on List<Listenable?>
Extension on a list of Listenable objects to integrate with ListenablesBuilder.
FHUListExtensions on List<Widget>
FHUListNotifierEx on List<E>
Extension on List<E> to provide easy access to creating a ValueNotifier for lists.
FHUMapNotifierEx on Map<K, V>
Extension on Map<K, V> to provide easy access to creating a ValueNotifier for maps.
FHUMediaQueryExtension on BuildContext
Extension for accessing various MediaQueryData properties easily.
FHUNavigationStateExtensions on State<StatefulWidget>
FHUNavigationStatelessExtensions on StatelessWidget
FHUNavigatorExtension on BuildContext
FHUNullSafeStringExtensions on String?
FHUNumericValueNotifierExtension on ValueNotifier<num>
NumericValueNotifierExtension
FHUNumExtensions on num
various extension on numbers for flutter
FHUNumNotifierEx on num
Extension on num to provide easy access to creating a ValueNotifier for numeric types.
FHUOrientationEx on Orientation
Extension for orientation utilities.
FHUPaddingExtensions on Widget
FHUPlatformExtension on BuildContext
Extension on BuildContext to provide easy access to the target platform.
FHUPlatformExtensionNullable on BuildContext?
Extension on nullable BuildContext to provide various platform checks.
FHUScaffoldMessengerExtension on BuildContext
FHUSetNotifierEx on Set<E>
Extension on Set<E> to provide easy access to creating a ValueNotifier for sets.
FHUSizeExtensions on Size
FHUStreamToValueNotifier on Stream<T>
Extension on Stream<T> to convert any stream into a ValueNotifier<T>.
FHUStringNotifierEx on String
Extension on String to provide easy access to creating a ValueNotifier for String values.
FHUStringToColorExtension on String
FHUTargetPlatformExtension on TargetPlatform?
Extension on TargetPlatform to provide various platform checks.
FHUTextDirection on TextDirection
A collection of utility extensions for working with text directionality and localization.
FHUThemeDataColorSchemeEx on ThemeData
FHUThemeDataExtension on ThemeData
Provides extensions on ThemeData to easily access text styles and check brightness.
FHUThemeDataPlatformExtensionNullable on ThemeData?
Extension on nullable ThemeData to provide various platform checks.
FHUThemeExtension on BuildContext
Provides extensions on BuildContext to easily access theme data and custom theme extensions.
FHUThemeModeEx on ThemeMode?
FHUThemeModeNotifierEx on ThemeMode
Extension on ThemeMode to provide easy access to creating a ValueNotifier for ThemeMode.
FHUUriNotifierEx on Uri
Extension on Uri to provide easy access to creating a ValueNotifier for Uri objects.
FHUValueListenableExtension on ValueListenable<T>
Extension on ValueListenable to seamlessly create a ValueListenableBuilder widget.
FHUValueListenableExtensions on ValueListenable<T>
FHUValueNotifierExtension on T
Extension on any non-nullable Object.
FHUValueNotifierExtensions on ValueNotifier<T>
IntlMapExtension on Map<Object, T>
Provides extensions for Map<Object, T> to support internationalization (i18n) message formatting. IntlMapExtension
IntlMapStringExtension on Map<Object, String>
Provides extensions for Map<Object, String> to support internationalization (i18n) message formatting. IntlMapStringExtension
IterableTypedListViewExtension on Iterable<E>
Extension on Iterable to build a TypedListView directly.
NumberToDateUtils on num
NumberToDateUtils
PaginatorTesting on IPaginator<T>
Extension methods to perform validations on any IPaginator.
ScrollControllerEx on ScrollController
Extension methods for enhancing ScrollController functionality
ScrollDirectionEx on ScrollDirection?
Extension methods for ScrollDirection enum
StreamControllerSafeExtensions on StreamController<T>
StreamErrorRecovery on Stream<T>
StreamTransformations on Stream<T>
Additional stream transformations not covered by the official Dart RateLimit extension.
ThemeModeNotifierEx on ValueNotifier<ThemeMode>

Constants

cssColorNamesToArgb → const Map<String, int>
A map of CSS color names to their corresponding ARGB values. Usage could be like with Color class: Color(cssColorNamesToArgb'red')
desktopBreakPoint → const Breakpoint
fullMonthsNames → const Map<int, String>
A map of integers to full month names.
fullWeekdays → const Map<int, String>
A map of integers to full weekday names.
greekNumberSuffixes → const List<String>
A list of Greek number suffixes used for large numbers representation.
millisecondsPerDay → const int
millisecondsPerDay
millisecondsPerHour → const int
millisecondsPerHour
millisecondsPerMinute → const int
millisecondsPerMinute
millisecondsPerSecond → const int
Milliseconds constants for different time units. millisecondsPerSecond
mobileBreakPoint → const Breakpoint
oneDay → const Duration
oneDay
oneHour → const Duration
oneHour
oneMinute → const Duration
oneMinute
oneSecond → const Duration
Common time-related durations defined as constants. oneSecond
regexAlphabet → const String
regexAlphabet
regexAlphanumeric → const String
Common regex patterns used for validation and parsing. regexAlphanumeric
regexComponentSeparator → const String
A regular expression pattern that matches whitespace-flexible comma separators. This pattern is designed to handle the standard format of CSS color functions like rgb(), rgba(), hsl(), etc.
regexContainsDigits → const String
regexContainsDigits
regexHasCapitalLetter → const String
regexHasCapitalLetter
regexNumeric → const String
regexNumeric
regexSpecialChars → const String
regexSpecialChars
regexStartsWithNumber → const String
regexStartsWithNumber
regexValidCurrency → const String
regexValidCurrency
regexValidEmail → const String
regexValidEmail
regexValidHexColor → const String
Validates hex color strings in various formats (CSS-style or 0x prefixed).
regexValidHslColor → const String
Legacy hsl()/hsla() regex - updated to handle all valid space combinations and Allow zero or more spaces before and after the comma.
regexValidIp4 → const String
regexValidIp4
regexValidIp6 → const String
regexValidIp6
regexValidModernColorFunc → const String
Modern color function regex – it now outright disallows any commas inside the parentheses.
regexValidPhoneNumber → const String
regexValidPhoneNumber
regexValidRgbColor → const String
Legacy rgb()/rgba() regex. (Note that if the function name is exactly "rgb(" then an alpha value is not allowed.)
regexValidUrl → const String
regexValidUrl
regexValidUsername → const String
regexValidUsername
romanNumerals → const Map<int, String>
A map of integers to Roman numeral representations.
smallMonthsNames → const Map<int, String>
A map of integers to abbreviated month names.
smallWeekdays → const Map<int, String>
A map of integers to abbreviated weekday names.
tabletBreakPoint → const Breakpoint
textDirectionLTR → const TextDirection
textDirectionRTL → const TextDirection
textDirectionUNKNOWN → const TextDirection

Properties

currentMillisecondsSinceEpoch int
Returns the current time in milliseconds since the Unix epoch.
no setter
httpStatusDevMessage Map<int, String>
A map of HTTP status codes to detailed technical messages.
no setter
httpStatusMessages Map<int, String>
A map of HTTP status codes to their corresponding messages.
no setter
httpStatusUserMessage Map<int, String>
A map of HTTP status codes to user-friendly messages.
no setter

Functions

edgeInsetsFlexible({double? all, double? horizontal, double? vertical, double? top, double? bottom, double? left, double? right}) EdgeInsets
getBreakpoint(Size size, List<Breakpoint> breakpoints) Breakpoint
getRawCountriesData() List<Map<String, dynamic>>
A list of raw data of countries.
getTimezonesList() List<String>
List of timezones
getTimezonesRawData() Map<String, Map<String, dynamic>>
This file contains the raw data of the timezones.
isEqual(dynamic a, dynamic b) bool
isTypePrimitive<T>() bool
isValuePrimitive(dynamic value) bool
Determines whether a given value is of a primitive type for JSON serialization.
randomInRange(num min, num max, [int? seed]) int
Generates a random integer within the specified range.
toBigInt(dynamic object, {Object? mapKey, int? listIndex, BigInt? defaultValue}) BigInt
Converts an object to a BigInt. mirroring the same static method in the ConvertObject, providing alternative easy less code usage options.
toBool(dynamic object, {Object? mapKey, int? listIndex, bool? defaultValue}) bool
Converts an object to a bool. mirroring the same static method in the ConvertObject, providing alternative easy less code usage options.
toDateTime(dynamic object, {dynamic mapKey, int? listIndex, String? format, String? locale, bool autoDetectFormat = false, bool useCurrentLocale = false, bool utc = false, DateTime? defaultValue}) DateTime
Attempts to convert an object to a bool, or returns null if the object is null or conversion is not applicable. mirroring the same static method in the ConvertObject, providing alternative easy less code usage options.
toDouble(dynamic object, {Object? mapKey, int? listIndex, String? format, String? locale, double? defaultValue}) double
Converts an object to a double. mirroring the same static method in the ConvertObject, providing alternative easy less code usage options.
toInt(dynamic object, {Object? mapKey, int? listIndex, String? format, String? locale, int? defaultValue}) int
Converts an object to an int. mirroring the same static method in the ConvertObject, providing alternative easy less code usage options.
toList<T>(dynamic object, {Object? mapKey, int? listIndex, List<T>? defaultValue}) List<T>
Converts an object to a List of type T. mirroring the same static method in the ConvertObject, providing alternative easy less code usage options.
toMap<K, V>(dynamic object, {Object? mapKey, int? listIndex, Map<K, V>? defaultValue}) Map<K, V>
Converts an object to a Map with keys of type K and values of type V. mirroring the same static method in the ConvertObject, providing alternative easy less code usage options.
toNum(dynamic object, {Object? mapKey, int? listIndex, String? format, String? locale, num? defaultValue}) num
Converts an object to a num. mirroring the same static method in the ConvertObject, providing alternative easy less code usage options.
toSet<T>(dynamic object, {Object? mapKey, int? listIndex, Set<T>? defaultValue}) Set<T>
Converts an object to a Set of type T. mirroring the same static method in the ConvertObject, providing alternative easy less code usage options.
toString1(dynamic object, {Object? mapKey, int? listIndex, String? defaultValue}) String
Converts any object to a string if the object is not null. mirroring the same static method in the ConvertObject, providing alternative easy less code usage options.
toType<T>(dynamic object) → T
Global function that allow Convert an object to a specified type.
toUri(dynamic object, {Object? mapKey, int? listIndex, Uri? defaultValue}) Uri
Converts an object to a Uri. mirroring the same static method in the ConvertObject, providing alternative easy less code usage options.
tryToBigInt(dynamic object, {Object? mapKey, int? listIndex, BigInt? defaultValue}) BigInt?
Attempts to convert an object to a BigInt, or returns null if the object is null or conversion fails. mirroring the same static method in the ConvertObject, providing alternative easy less code usage options.
tryToBool(dynamic object, {Object? mapKey, int? listIndex, bool? defaultValue}) bool?
Attempts to convert an object to a bool, or returns null if the object is null or conversion is not applicable. mirroring the same static method in the ConvertObject, providing alternative easy less code usage options.
tryToDateTime(dynamic object, {dynamic mapKey, int? listIndex, String? format, String? locale, bool autoDetectFormat = false, bool useCurrentLocale = false, bool utc = false, DateTime? defaultValue}) DateTime?
Attempts to convert an object to a DateTime, or returns null if the object is null or conversion fails. mirroring the same static method in the ConvertObject, providing alternative easy less code usage options.
tryToDouble(dynamic object, {Object? mapKey, int? listIndex, String? format, String? locale, double? defaultValue}) double?
Attempts to convert an object to a double, or returns null if the object is null or conversion fails. mirroring the same static method in the ConvertObject, providing alternative easy less code usage options.
tryToInt(dynamic object, {Object? mapKey, int? listIndex, String? format, String? locale, int? defaultValue}) int?
Attempts to convert an object to an int, or returns null if the object is null or conversion fails. mirroring the same static method in the ConvertObject, providing alternative easy less code usage options.
tryToList<T>(dynamic object, {Object? mapKey, int? listIndex, List<T>? defaultValue}) List<T>?
Attempts to convert an object to a List of type T, or returns null if conversion is not possible. mirroring the same static method in the ConvertObject, providing alternative easy less code usage options.
tryToMap<K, V>(dynamic object, {Object? mapKey, int? listIndex, Map<K, V>? defaultValue}) Map<K, V>?
Attempts to convert an object to a Map with keys of type K and values of type V. mirroring the same static method in the ConvertObject, providing alternative easy less code usage options.
tryToNum(dynamic object, {Object? mapKey, int? listIndex, String? format, String? locale, num? defaultValue}) num?
Attempts to convert an object to a num, or returns null if the object is null or conversion fails. mirroring the same static method in the ConvertObject, providing alternative easy less code usage options.
tryToSet<T>(dynamic object, {Object? mapKey, int? listIndex, Set<T>? defaultValue}) Set<T>?
Attempts to convert an object to a Set of type T, or returns null if conversion is not possible. mirroring the same static method in the ConvertObject, providing alternative easy less code usage options.
tryToString(dynamic object, {Object? mapKey, int? listIndex, String? defaultValue}) String?
Converts any object to a string, or returns null if the object is null. mirroring the same static method in the ConvertObject, providing alternative easy less code usage options.
tryToType<T>(dynamic object) → T?
Global function that allow Convert an object to a specified type or return null.
tryToUri(dynamic object, {Object? mapKey, int? listIndex, Uri? defaultValue}) Uri?
Attempts to convert an object to a Uri, or returns null if the object is null or conversion fails. mirroring the same static method in the ConvertObject, providing alternative easy less code usage options.

Typedefs

AsyncAction = FutureOr<void> Function()
A function signature for asynchronous actions.
Coordinates = ({double latitude, double longitude})
Represents geographical coordinates with latitude and longitude. For example, (latitude: -20.0, longitude: 30.0).
CountrySearchAlgorithm = List<DHUCountry> Function(List<DHUCountry> countries, String query)
A type for country search algorithms that takes a list of countries and a query string, and returns a filtered list of countries.
Currency = ({String code, String name, String symbol})
Represents a currency with its code, name, and symbol. For example, (code: "USD", name: "United States dollar", symbol: "$").
IndexedPredicate<T> = bool Function(int index, T)
A type alias representing a predicate function that takes an index and a value of type T and returns a boolean value.
Language = ({String code, String name})
Represents a language with its code and name. For example, (code: "en", name: "English").
LoggerFunction = void Function(String message)
A function signature for logging messages.
NativeName = ({String common, String language, String official})
Represents a native name of the country in different languages. For example, (language: "eng", official: "Republic of Zimbabwe", common: "Zimbabwe").
OnLayoutDirectionChanged = void Function(Axis?)
Predicate<T> = bool Function(T)
A type alias representing a predicate function that takes a value of type T and returns a boolean value.
TimerFactory = Timer Function(Duration duration, void callback())
A function signature for creating timers. timerFactory allows customizing timer creation, useful for testing or specialized timing behavior. Defaults to standard Timer.new.
TypedListViewBuilder<T> = Widget Function(int index, T item)

Exceptions / Errors

InvalidConfigurationError
Exception for invalid configuration settings related to string similarity.
PaginationException
Exception thrown when pagination operations fail.
StringSimilarityError
Custom exception for string similarity issues.