utils library
Utility functions used by the generated code.
Generated clients SHOULD NOT re export this library. It is only needed by the client itself.
Classes
- HeaderCodec
- A HeaderCodec encodes the json representation of a Header objects to strings and decodes strings to serialized Header objects.
- HeaderDecoder
- This class converts strings to serialized Header JSON objects.
- HeaderEncoder
- This class converts serialized Header JSON objects to strings.
Extensions
- UriExtension on Uri
- Helpers extension for Uris.
Functions
-
checkIterable(
dynamic input, String parameterName, {int? maxItems, int? minItems, bool uniqueItems = false}) → void -
Checks the
input
against the given Iterable validators. -
checkNumber(
dynamic input, String parameterName, {num? multipleOf, num? maximum, num? exclusiveMaximum, num? minimum, num? exclusiveMinimum}) → void -
Checks the
input
against the given Number validators. -
checkString(
dynamic input, String parameterName, {int? maxLength, int? minLength, RegExp? pattern}) → void -
Checks the
input
against the given String validators. -
validateAnyOf(
List values, List< String> names) → void -
Validates that at least one value in the given list is not
null
. -
validateOneOf(
List values, List< String> names) → void - Validates that exactly one value in the given list is not null.