onConfirmTap method

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

Handles dialog confirmation, returning selected values.

Parameters:

  • context: BuildContext for navigation
  • selectedValues: Currently selected values
  • onConfirm: Optional callback with selected values

Pops the dialog and:

  1. Returns selectedValues via Navigator
  2. Invokes onConfirm callback if provided

Implementation

void onConfirmTap(BuildContext context, List<T> selectedValues, void Function(List<T>)? onConfirm) {
  Navigator.of(context).pop(selectedValues);
  onConfirm?.call(selectedValues);
}