utils_set_datas_void method

void utils_set_datas_void(
  1. List datas,
  2. dynamic value
)

Implementation

void utils_set_datas_void(List datas, dynamic value) {
  dynamic state_data = this;
  for (var index = 0; index < datas.length; index++) {
    dynamic data_key = datas[index];
    if (state_data[data_key] is Map == false) {
      state_data[data_key] = {};
    }
    if (index == datas.length - 1) {
      state_data[data_key] = value;
    }
    state_data = state_data[data_key];
  }
  return;
}