onCubitsChanged method

void onCubitsChanged(
  1. List<CubitEntity> cubits
)

Implementation

void onCubitsChanged(List<CubitEntity> cubits) {
  emit(state.copyWith(
    cubits: Map.fromEntries(cubits.map((e) => MapEntry(e.id, () => e))),
    instantiatedCubits: Map.fromEntries(cubits.map((e) => MapEntry(e.id, e))),
  ));
}