removeSource method
Remove a source.
Implementation
void removeSource(DiveSource source, Iterable<DiveSource> sources) {
final state = DiveCore.container.read(provider.notifier).state;
if (state.currentScene == null) return;
final item = state.currentScene?.findSceneItem(source);
if (item != null) {
state.currentScene?.removeSceneItem(item);
final newState = state.copyWith(sources: sources.toList()..remove(source));
source.dispose();
DiveCore.container.read(provider.notifier).state = newState;
}
}