onConfirmTap method
Pops the dialog from the navigation stack and returns the selected values. Calls the onConfirm function if one was provided.
Implementation
void onConfirmTap(
BuildContext ctx, dynamic selectedValues, Function(dynamic)? onConfirm) {
Navigator.pop(ctx, selectedValues);
if (onConfirm != null) {
onConfirm(selectedValues);
}
}