onConfirmTap method

void onConfirmTap(
  1. BuildContext ctx,
  2. List<T> selectedValues,
  3. dynamic onConfirm(
    1. List<T>
    )?
)

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, List<T> selectedValues, Function(List<T>)? onConfirm) {
  Navigator.pop(ctx, selectedValues);
  if (onConfirm != null) {
    onConfirm(selectedValues);
  }
}