selectedElement function

  1. @Riverpod(dependencies: [selection, SelectedElementNotifier])
Selection? selectedElement(
  1. Ref ref
)

Implementation

@Riverpod(dependencies: [selection, SelectedElementNotifier])
Selection? selectedElement(Ref ref) {
  final selected = ref.watch(selectedElementNotifierProvider);
  if (selected == null) return null;

  return ref.watch(selectionProvider(selected));
}