onConfirmTap method
Handles dialog confirmation, returning selected values.
Parameters:
context: BuildContext for navigationselectedValues: Currently selected valuesonConfirm: Optional callback with selected values
Pops the dialog and:
- Returns
selectedValuesvia Navigator - Invokes
onConfirmcallback if provided
Implementation
void onConfirmTap(BuildContext context, List<T> selectedValues, void Function(List<T>)? onConfirm) {
Navigator.of(context).pop(selectedValues);
onConfirm?.call(selectedValues);
}