dotRestore function

Object? dotRestore(
  1. dynamic value, {
  2. bool shouldWarn = true,
})

Implementation

Object? dotRestore(value, {bool shouldWarn = true}) {
  return switch (value) {
    Map value => _restoreDottedMap(value, shouldWarn: shouldWarn),
    List value =>
      value.map((e) => dotRestore(e, shouldWarn: shouldWarn)).toList(),
    Set value =>
      value.map((e) => dotRestore(e, shouldWarn: shouldWarn)).toSet(),
    Iterable value => value.map((e) => dotRestore(e, shouldWarn: shouldWarn)),
    _ => value,
  };
}