convertToList<O> static method

List<O> convertToList<O>(
  1. dynamic value, {
  2. List<O>? defaultValue,
  3. bool skipInvalid = false,
  4. SuperConverter<O>? converter,
})

Implementation

static List<O> convertToList<O>(
  dynamic value, {
  /// return default value in case of there are no item
  List<O>? defaultValue,

  /// skip invalid items if item got validation error
  bool skipInvalid = false,

  /// to use single time used converter
  SuperConverter<O>? converter,
}) {
  return ListConverter<O>().handle(
    value,
    defaultValue: defaultValue,
    skipInvalid: skipInvalid,
    converter: converter,
  );
}