utils library

Utility classes, functions and exceptions that are part of DataHub.




MapEquality on Map<K, V>


addBase64Padding(String value) String
buildQueryString(Map<String, String?> query) String
decodeEnum<T extends Enum>(dynamic raw, List<T> values, {String? name}) → T
decodeEnumNullable<T extends Enum>(dynamic raw, List<T> values, {String? name}) → T?
decodeList<T extends List<E>?, E>(dynamic raw, E decode(dynamic, String?), {String? name}) → T
decodeListTyped<T extends List<E>?, E>(dynamic raw, {String? name}) → T
decodeMap<T extends Map<String, V>?, V>(dynamic raw, V decode(dynamic, String?), {String? name}) → T
decodeMapTyped<T extends Map<String, V>?, V>(dynamic raw, {String? name}) → T
decodeTyped<T>(dynamic raw, {TransferCodec<T>? codec, String? name}) → T
Decodes a typed value from its transfer representation. (JSON)
encodeList<T extends List<E>?, E>(T value, dynamic encode(E)) → dynamic
encodeListTyped<T extends List<E>?, E>(T value) → dynamic
encodeMap<T extends Map<String, V>?, V>(T value, dynamic encode(V)) → dynamic
encodeMapTyped<T extends Map<String, V>?, V>(T value) → dynamic
encodeTyped<T>(T value, {TransferCodec<T>? codec}) → dynamic
Encodes a typed value to its transfer representation. (JSON)
getHttpStatus(int statusCode) String
randomHexId(int parts) String
stripBase64Padding(String value) String
uuid() String

Exceptions / Errors

Base error for when DataHub code APIs are used incorrectly by user code.
Base exception for when things go wrong at runtime inside the DataHub API framework.