gmana library

Classes

Debouncer
A small utility to debounce function execution.
Either<L, R>
A generic type that represents a value of one of two possible types (a disjoint union).
EmailBlockedDomainIssue
Email domain appears in the configured block list.
EmailDisposableDomainIssue
Email domain appears in the configured disposable-domain list.
EmailDomainTooLongIssue
Email domain exceeds the configured maximum length.
EmailEmptyIssue
Email input is empty after trimming.
EmailInvalidFormatIssue
Email input does not match the supported address format.
EmailLocalPartTooLongIssue
Email local part exceeds the configured maximum length.
EmailTooLongIssue
Email address exceeds the configured maximum total length.
EmailValidationConfig
Configuration rules for email validation.
EmailValidationIssue
Base type for email validation failures.
EmailValidator
Validates and normalizes email addresses.
Experimental
Annotation for predicates not yet stable enough for production use.
Failure
Represents a failure in an operation, usually as the Left value of an Either.
IdGenerator
Public API for generating IDs and reversible encodings.
Left<L, R>
Represents the failure or error side of an Either.
NoParams
A class that represents a lack of parameters.
NumberDecimalPlacesExceededIssue
Number has too many decimal places.
NumberEmptyIssue
Number input is empty.
NumberInvalidFormatIssue
Number input is malformed.
NumberNegativeNotAllowedIssue
Negative values are not allowed.
NumberNotIntegerIssue
A whole number is required.
NumberTooLargeIssue
Number is larger than the allowed maximum.
NumberTooSmallIssue
Number is smaller than the allowed minimum.
NumberValidationConfig
Configuration for number validation.
NumberValidationIssue
Base type for number validation failures.
NumberValidator
Canonical validator for number inputs.
PasswordEmptyIssue
Password input is empty.
PasswordMissingDigitIssue
Password is missing a digit.
PasswordMissingLowercaseIssue
Password is missing a lowercase letter.
PasswordMissingSpecialCharacterIssue
Password is missing a special character.
PasswordMissingUppercaseIssue
Password is missing an uppercase letter.
PasswordRepeatedCharacterIssue
Password uses a repeated-character pattern.
PasswordSequentialPatternIssue
Password uses a sequential pattern.
PasswordStrength
Represents the strength grading of a given password.
PasswordTooCommonIssue
Password is too common.
PasswordTooLongIssue
Password is longer than allowed.
PasswordTooShortIssue
Password is shorter than allowed.
PasswordValidationConfig
Configuration for password validation.
PasswordValidationIssue
Base type for password validation failures.
PasswordValidator
Canonical validator for password inputs.
A concrete implementation of Either that represents the successful value (Right) in a computation.
SecureIdGenerator
Cryptographically-secure variant of IdGenerator.
StreamUseCase<SuccessType, Params>
A contract for defining streaming use cases.
TextContainsBlacklistedIssue
Text contains one or more blacklisted words.
TextEmptyIssue
Text input is empty.
TextInvalidCharactersIssue
Text contains characters outside the allowed set.
TextInvalidPatternIssue
Text does not match the configured pattern.
TextOnlyWhitespaceIssue
Text contains only whitespace.
TextTooLongIssue
Text is longer than allowed.
TextTooShortIssue
Text is shorter than allowed.
TextValidationConfig
Configuration for text validation.
TextValidationIssue
Base type for text validation failures.
TextValidator
Canonical validator for text inputs.
Throttler
A small utility to throttle function execution.
Unit
Represents a void-like value in functional programming.
UseCase<SuccessType, Params>
A contract for defining use cases (application business logic) in a clean architecture approach.
ValidationIssue
Base contract for typed validation failures.

Extensions

BoolNullableX on bool?
Extensions for nullable bool values providing safe defaults.
DoubleNullableX on double?
Extensions for nullable double values providing safe defaults.
DurationNaturalLanguageX on Duration
Alternative duration formatting for human-readable UI copy.
HumanizedDuration on Duration
Formatting, arithmetic, and utility methods for Duration.
IntNullableX on int?
Extensions for nullable int values providing safe defaults.
IntX on int
Core extensions on int adding parity checks, digits access, and iterative utilities.
IterableNullableX on Iterable<T?>
Extension on Iterable providing utilities for filtering and transforming nullable elements safely.
IterableNumX on Iterable<T>
Comprehensive extensions on Iterable for numeric types.
IterableOfIterablesX on Iterable<Iterable<E>>
Extension on Iterable of Iterables providing methods to flatten nested collections.
IterableX on Iterable<T>
General utility extension on Iterable providing flat-mapping, grouping, and chunking capabilities.
NumDurationExtension on num
Creates Duration values from numbers, such as 5.seconds.
NumNullableX on num?
Extensions for nullable num values providing safe defaults.
NumX on num
Shared mathematical, formatting, and conversion extensions on num (covering both int and double).
StreamListX on Stream<List<T>>
Extension providing collection-oriented functional operations for Streams emitting Lists.
StreamX on Stream<T>
General-purpose utility extension on Stream providing enhanced filtering, timing controls (like debounce/throttle), error handling, and scanning operators.
StringDateExtension on String
Date validation and comparison utilities for date strings.
StringNullableX on String?
Extension on nullable String providing safe fallback and mapping methods.
StringValidation on String
A vast collection of validation utilities mapped as getters on String.
StringX on String
Main extension on String providing comprehensive conversion and formatting tools.

Constants

experimental → const Experimental
Marks a predicate as experimental — subject to change or removal.
kDefaultDebounceTime → const int
Default debounce time in milliseconds.
kDefaultDisposableDomains → const Set<String>
Disposable domain list - extend this or inject your own. Consider loading from a remote source in production.
kDefaultThrottleDuration → const int
Default throttle time in milliseconds.
unit → const Unit
A singleton instance representing a unit of work with no meaningful value.

Functions

contains(String str, String seed) → bool
Returns true if str contains seed.
containsIgnoreCase(String str, String seed) → bool
Returns true if str contains seed, ignoring case.
equals(String? str, String comparison) → bool
Returns true if str equals comparison.
isAfter(String str, [String? reference]) → bool
Returns true if str represents a date after reference.
isAlpha(String str) → bool
Returns true if str contains only ASCII alphabetic characters (a–z, A–Z).
isAlphaNumeric(String str) → bool
Returns true if str contains only ASCII alphanumeric characters (a–z, A–Z, 0–9).
isAscii(String str) → bool
Returns true if str contains only printable ASCII characters (U+0000–U+007F).
isBase64(String str) → bool
Returns true if str is a valid Base64-encoded string.
isBefore(String str, [String? reference]) → bool
Returns true if str represents a date before reference.
isBetween(String str, String from, String to) → bool
Returns true if str represents a date strictly between from and to.
isByteLength(String str, int min, [int? max]) → bool
Returns true if str byte-length is within `min`, `max`.
isCreditCard(String str) → bool
Returns true if str is a valid credit card number (Luhn check).
isDate(String str) → bool
Returns true if str is a parseable date string.
isDivisibleBy(String str, String n) → bool
Returns true if the numeric value of str is divisible by n.
isEmail(String str) → bool
Returns true if str matches the RFC 5322 email format heuristic.
isFloat(String str) → bool
Returns true if str represents a floating-point number.
isFQDN(String str, {bool requireTld = true, bool allowUnderscores = false}) → bool
Returns true if str is a valid fully-qualified domain name.
isFullWidth(String str) → bool
Returns true if str contains full-width Unicode characters.
isFuture(String str) → bool
Returns true if str represents a date in the future.
isHalfWidth(String str) → bool
Returns true if str contains half-width Unicode characters.
isHexadecimal(String str) → bool
Returns true if str is a valid hexadecimal string.
isHexColor(String str) → bool
Returns true if str is a valid hex color (e.g. #FFF or #FFFFFF).
isInt(String str) → bool
Returns true if str represents an integer.
isIpv4(String str) → bool
Returns true if str is a valid IPv4 address.
isIpv6(String str) → bool
Returns true if str is a valid IPv6 address.
isISBN(String? str, [String? version]) → bool
Returns true if str is a valid ISBN-10 or ISBN-13.
isJson(String str) → bool
Returns true if str is valid JSON.
isLeapYear(String str) → bool
Returns true if str represents a date in a leap year.
isLength(String str, int min, [int? max]) → bool
Returns true if the display-length of str is within `min`, `max`, counting surrogate pairs as single characters.
isLowerCase(String str) → bool
Returns true if str is entirely lowercase (or has no cased characters).
isMongoId(String str) → bool
Returns true if str is a valid 24-character MongoDB ObjectId (hex).
isMultiByte(String str) → bool
Returns true if str contains multi-byte (non-ASCII) characters.
isNull(String? str) → bool
Returns true if str is null or empty.
isNullOrEmpty(String? str) → bool
Returns true if str is null or empty.
isNumeric(String str) → bool
Returns true if str contains only numeric digits (optionally negative).
isPast(String str) → bool
Returns true if str represents a date in the past.
isPostalCode(String? text, String locale, {bool orElse()?}) → bool
Returns true if text is a valid postal code for locale.
isSurrogatePair(String str) → bool
Returns true if str contains surrogate pairs.
isToday(String str) → bool
Returns true if str represents today's UTC date.
isUpperCase(String str) → bool
Returns true if str is entirely uppercase (or has no cased characters).
isUuid(String? str, [String? version]) → bool
Returns true if str is a valid UUID (any version by default).
isVariableWidth(String str) → bool
Returns true if str contains both full-width and half-width characters.
isWeekday(String str) → bool
Returns true if str represents a Monday–Friday.
isWeekend(String str) → bool
Returns true if str represents a Saturday or Sunday.
matches(String str, String pattern) → bool
Returns true if str matches the regex pattern.
resolveEmailValidationIssue(EmailValidationIssue issue) → String
Default English messages for email validation issues.
resolveNumberValidationIssue(NumberValidationIssue issue) → String
Default English messages for number validation issues.
resolvePasswordValidationIssue(PasswordValidationIssue issue) → String
Default English messages for password validation issues.
resolveTextValidationIssue(TextValidationIssue issue) → String
Default English messages for text validation issues.
tryParseDate(String str) → DateTime?
Parses str as a UTC DateTime, returning null on failure.

Typedefs

FutureResult<T> = Future<Result<T>>
A future that completes with a fallible Result.
FutureResultUnit = FutureResult<Unit>
A FutureResult for operations that return no meaningful success value.
Result<T> = Either<Failure, T>
A standard fallible result with Failure on the left and T on the right.
ResultUnit = Result<Unit>
A Result for operations that return no meaningful success value.
StreamResult<T> = Stream<Result<T>>
A stream that emits fallible Result values.
StreamResultUnit = StreamResult<Unit>
A StreamResult for streams that emit no meaningful success value.
ValidationMessageResolver<TIssue extends ValidationIssue> = String Function(TIssue issue)
Maps a typed validation issue into a user-facing message.
ValidationResult<TIssue extends ValidationIssue, TValue> = Either<TIssue, TValue>
Canonical result shape for validators.