personJoined function

void personJoined(
  1. PersonJoinedOptions options
)

Function that handles a person joining an event.

This function displays an alert/notification about the person joining the event. It takes a PersonJoinedOptions instance, which includes the person's name and an optional ShowAlert function to display the alert/notification.

Example usage:

final options = PersonJoinedOptions(
  name: "Alice",
  showAlert: (message: "Alice joined the event.", type: "success", duration: 3000),
);
personJoined(options);

Implementation

void personJoined(PersonJoinedOptions options) {
  options.showAlert?.call(
    message: '${options.name} has joined the event.',
    type: 'success',
    duration: 3000,
  );
}