wrap_values static method

Object? wrap_values(
  1. Object? data
)

Implementation

static Object? wrap_values(Object? data) {
  if (data == null) return null;

  if (data is List) {
    return List.generate(
      data.length,
      (e) => wrap_value(data[e]),
      growable: false,
    );
  } else if (data is Map<String, dynamic>) {
    return data.map(
      (key, value) => MapEntry(key, wrap_value(value)),
    );
  }

  return data;
}