util/output/output_formatter library
Classes
-
JsonOutputFormatter<
O extends Object> -
OutputFormatter<
O extends Object, D extends Object> - Base class for output formatters - given an input "object" type O returns a formatted "data" type D.
-
YamlOutputFormatter<
O extends Object>
Functions
-
mapValueFormatter<
O extends Map< (String, Object?> >{required String key}) → ValueFormatter< O> - Returns a ValueFormatter function that gets the value for the given key of a Map<String, Object?> and applies standard formatting on it, depending on its datatype.
-
objValueFormatter<
O extends Object> ({required ValueGetter< O> getter}) → ValueFormatter<O> - Returns a ValueFormatter function that gets the desired value for an object and applies standard formatting on it, depending on its datatype.
Typedefs
-
ValueFormatter<
O extends Object> = String Function(O object, {required bool? utc}) - A function that returns a formatted String value for a given object or for an attribute of that object.
-
ValueGetter<
O extends Object> = Object? Function(O object) - A function that returns the desired value for a given object or for an attribute of that object.