getSidebarDestinations function

List<SidebarDestinationData> getSidebarDestinations(
  1. BuildContext context,
  2. WidgetRef ref
)

Implementation

List<SidebarDestinationData> getSidebarDestinations(
  BuildContext context,
  WidgetRef ref,
) =>
    [
      SidebarDestinationData(
        "/",
        Icons.home_outlined,
        Icons.home,
        "Home",
        () => const HomeRoute().go(context),
      ),
      if (ref.watch(currentUserProvider)?.customClaims.admin ?? false)
        SidebarDestinationData(
          "/admin",
          Icons.admin_panel_settings_outlined,
          Icons.admin_panel_settings,
          t.admin.admin,
          () => const AdminRoute().go(context),
        ),
      SidebarDestinationData(
        "/leden",
        Icons.groups_2_outlined,
        Icons.groups_2,
        t.members.members,
        () => const MembersRoute().go(context),
      ),
      SidebarDestinationData(
        "/lustrum",
        CustomIcons.lustrumGlyph,
        CustomIcons.lustrumGlyph,
        t.lustrum.lustrum,
        () => launchUrl(
          Uri.parse("https://www.aegee-leiden.nl/lustrum"),
          mode: LaunchMode.externalApplication,
        ),
      ),
      SidebarDestinationData(
        "/europe-info",
        Icons.travel_explore_outlined,
        Icons.travel_explore,
        "AEGEE-Europe",
        () => launchUrl(
          Uri.parse(
            "https://drive.google.com/file/d/1ED3qnNC8SXAricQyVa1F53OI21fdNdQ_/view?usp=sharing",
          ),
          mode: LaunchMode.externalApplication,
        ),
      ),
      SidebarDestinationData(
        "/vertrouwensorgaan",
        Icons.health_and_safety_outlined,
        Icons.health_and_safety,
        t.confidentialBody.confidentialBody,
        () => const ConfidentialBodyRoute().go(context),
      ),
      SidebarDestinationData(
        "/documenten",
        Icons.folder_outlined,
        Icons.folder,
        t.resources.tiletitle,
        () => const ResourcesRoute().go(context),
      ),
      SidebarDestinationData(
        "/instellingen",
        Icons.settings_outlined,
        Icons.settings,
        t.settings.settings,
        () => const SettingsRoute().go(context),
      ),
      SidebarDestinationData(
        "link",
        Icons.shopping_basket_outlined,
        Icons.shopping_basket,
        t.quickLinks.merchandise.title,
        () => showModalBottomSheet(
          useRootNavigator: true,
          context: context,
          builder: (_) => QuickLinkDialog(
            linkKey: "merchandise",
            primaryActionLink:
                "https://docs.google.com/forms/d/e/1FAIpQLSdpgyLrsGT4S0gVJ0HtpksdVscYqjMKs2_sivZh1OGSqAs1CA/viewform?pli=1&usp=pp_url&entry.64572116=${ref.watch(currentUserProvider)?.displayName}",
          ),
        ),
      ),
      SidebarDestinationData(
        "link",
        Icons.inventory_2_outlined,
        Icons.inventory,
        t.quickLinks.inventory.title,
        () => showModalBottomSheet(
          useRootNavigator: true,
          context: context,
          builder: (_) => const QuickLinkDialog(
            linkKey: "inventory",
            primaryActionLink:
                "https://airtable.com/appxVZRDYAigZdIQW/shrDd2C4jCSdledUq",
            secondaryActionLink:
                "https://airtable.com/appxVZRDYAigZdIQW/shrVX5xgf4Xlb0BH8",
          ),
        ),
      ),
      SidebarDestinationData(
        "link",
        Icons.percent_outlined,
        Icons.percent,
        t.quickLinks.discounts.title,
        () => showModalBottomSheet(
          useRootNavigator: true,
          context: context,
          builder: (_) => const QuickLinkDialog(
            linkKey: "discounts",
            primaryActionLink:
                "https://docs.google.com/document/d/1FiBfTsx3Zk5S0QFC9MG8Fj0sM-lG8meqndMJa035czs/edit?usp=sharing",
          ),
        ),
      ),
      SidebarDestinationData(
        "link",
        Icons.design_services_outlined,
        Icons.design_services,
        t.quickLinks.vi.title,
        () => showModalBottomSheet(
          useRootNavigator: true,
          context: context,
          builder: (_) => const QuickLinkDialog(
            linkKey: "vi",
            primaryActionLink:
                "https://sites.google.com/view/visual-identity-aegee-leiden/home",
          ),
        ),
      ),
      SidebarDestinationData(
        "link",
        Icons.lightbulb_outlined,
        Icons.lightbulb,
        t.quickLinks.project_ideas.title,
        () => showModalBottomSheet(
          useRootNavigator: true,
          context: context,
          builder: (_) => const QuickLinkDialog(
            linkKey: "project_ideas",
            primaryActionLink:
                "https://docs.google.com/forms/u/3/d/e/1FAIpQLSe0iGHPf2PWD1b8bKsfUT47SRztgiEp1mTZlSskIoekXSq4zg/viewform?usp=send_form",
          ),
        ),
      ),
      SidebarDestinationData(
        "link",
        Icons.rate_review_outlined,
        Icons.rate_review,
        t.quickLinks.feedback_form.title,
        () => showModalBottomSheet(
          useRootNavigator: true,
          context: context,
          builder: (_) => QuickLinkDialog(
            linkKey: "feedback_form",
            primaryActionLink:
                "https://docs.google.com/forms/d/e/1FAIpQLSeZQYX3T-Il5G3KQ9Un3ytfwNwm6m5FrIPGSRNI3Qv4OERc2Q/viewform?usp=pp_url&entry.459517007=${ref.watch(currentUserProvider)?.displayName}",
          ),
        ),
      ),
    ];