VoyagerUtils class

Common utils used throught Voyager package

Constructors

VoyagerUtils.new()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

cleanUrl(String url) String
sanitized url for Voyager processing
copyIt(Map<String, dynamic> config) Map<String, dynamic>
makes a deep copy of Map<String, dynamic>
fromPath(String path) Uri
creates Uri based on path
interpolate(String format, Map<String, dynamic> values) String?
interpolates value of the string, e.g.:
interpolateDynamic(dynamic param, VoyagerContext context) → void
interpolates dynamic param with values from context
interpolateList(List array, VoyagerContext context) → void
interpolates array with values from context
isListOrMap(Object object) bool
check if an object is a list or map
isNullOrBlank(String? it) bool
checks if string is null or blank
isTuple(dynamic object) bool
check if a dynamic object is a tuple
isWildcard(String path) bool
checks if given path is a :wildcard:
tuple(dynamic object) MapEntry<String, dynamic>
converts dynamic object to a tuple MapEntry<String, dynamic>
typify(String input) String
"typifies" a path to a snake case variable should be aligned with this implementation: https://github.com/vishna/voyager-codegen/blob/master/voyager-codegen/src/main/kotlin/dev/vishna/voyager/codegen/X.kt#L56