onOrgNavTapped function

void onOrgNavTapped(
  1. int index,
  2. BuildContext context,
  3. String? orgId
)

Routes to the requested top-level org destination. Index must be 0..4.

Implementation

void onOrgNavTapped(int index, BuildContext context, String? orgId) {
  if (orgId == null) return;
  switch (index) {
    case 0:
      context.go('/org/$orgId');
    case 1:
      context.go('/org/$orgId/members');
    case 2:
      context.go('/org/$orgId/assignments');
    case 3:
      context.go('/org/$orgId/analytics');
    case 4:
      context.go('/org/$orgId/settings');
  }
}