Skip to main content

switchOrg method

void switchOrg(

  1. [[OrgInfo] switchToOrg]

)

This function switches the organization to the specified switchToOrg.

If selectedOrg is equal to switchToOrg and switchToOrg is present, a warning message is displayed using a custom Snackbar. Otherwise, it saves the switchToOrg as the current organization, updates the selected organization name, and displays an informational message using a custom Snackbar.

params:

  • switchToOrg: The organization to switch to.

returns: None

Implementation

void switchOrg(OrgInfo switchToOrg) 
  1. talawa
  2. custom_drawer_view_model
  3. CustomDrawerViewModel
  4. switchOrg method
CustomDrawerViewModel class