handleInteraction method

void handleInteraction(
  1. BuildContext context,
  2. UserInteraction? interaction
)

Implementation

void handleInteraction(BuildContext context, UserInteraction? interaction) {
  if (interaction == null || !interaction.isValid) {
    // No action or invalid action - silently ignore
    return;
  }

  switch (interaction.interactionType) {
    case UserInteractionType.internal:
      _handleInternalNavigation(context, interaction);
      break;

    case UserInteractionType.external:
      _handleExternalUrl(context, interaction);
      break;

    case UserInteractionType.custom:
      _handleCustomAction(context, interaction);
      break;

    case UserInteractionType.none:
      // Do nothing - intentional no-op
      break;
  }
}