_tools/utils/utils library

Functions

filterMap<K, V>(Map<K, V> map, bool predicate(K key, V value)) Map<K, V>
Filters key-value pairs in a Map
fromPairs<K extends String, V>(List<MapEntry<K, V>> entries) Map<K, V>
Converts a list of key-value pairs to a Map
getShortUuid([String? prefix]) String
Generates a short UUID with optional prefix
getUuid([String? prefix]) String
Generates a UUID with optional prefix
isArray(dynamic value) bool
Checks if the value is an array
isBoolean(dynamic value) bool
Checks if the value is a boolean
isCallback(dynamic obj) bool
Checks if the value is a callback
isErrorLike(dynamic value) bool
Checks if the value is an error-like object
isFunction(dynamic value) bool
Checks if the value is a function
isInstance(dynamic value) bool
Checks if the value is an instance
isInstanceArg(dynamic value) bool
Checks if the value is an instance argument
isNullOrUndefined(dynamic value) bool
Checks if the value is null or undefined
isNumber(dynamic value) bool
Checks if the value is a number
isObject(dynamic value) bool
Checks if the value is an object
isPlainObject(dynamic obj) bool
Checks if the value is a plain object
isPromise(dynamic obj) bool
Checks if the value is a Promise
isString(dynamic value) bool
Checks if the value is a string
keyPathVisitor<T>(Map<String, dynamic> obj, List<String> path, [T? defaultValue]) → T
Visits a nested map structure using a path of keys Returns the value at the specified path or a default value if not found
mapKeys<K1, K2, V>(Map<K1, V> map, K2 transform(K1 key)) Map<K2, V>
Transforms keys in a Map
mapValues<K, V1, V2>(Map<K, V1> map, V2 transform(V1 value)) Map<K, V2>
Transforms values in a Map
safeStringify(dynamic value) String
Safely converts a value to a string
stringifyKV(Map<String, dynamic> kv) String
Formats key-value pairs
stringifyLog(List content) String
Formats log content
toPairs<K extends String, V>(Map<K, V> map) List<MapEntry<K, V>>
Converts a Map to a list of key-value pairs