onParametersChanged method

void onParametersChanged(
  1. List<Parameter> parameters, {
  2. bool shouldOverrideExisting = false,
})

Implementation

void onParametersChanged(List<Parameter> parameters,
    {bool shouldOverrideExisting = false}) {
  if (state.parameters.isNotEmpty) {
    if (!shouldOverrideExisting) {
      return;
    }
  }
  assert(
      !const DeepCollectionEquality().equals(state.parameters, parameters));
  emit(state.copyWith(
      parameters: Map.fromEntries(parameters.map((v) => MapEntry(v.id, v)))));
}