general_lib_extension_updateVoid method

void general_lib_extension_updateVoid({
  1. required Map data,
})

Implementation

void general_lib_extension_updateVoid({
  required Map data,
}) {
  data.forEach((key, value) {
    try {
      // jika tidak ada key
      if (!containsKey(key)) {
        this[key] = value;
        return;
      }

      // jika ada value
      if (this[key] == null) {
        this[key] = value;
      } else if (value is Map && this[key] is Map) {
        (this[key] as Map).general_lib_extension_updateVoid(data: value);
      } else if (key is List && this[key] is List) {}
    } catch (e) {}
  });
  return;
}