currentWhatsNewFeatures function

List<WhatsNewFeature> currentWhatsNewFeatures()

The current release's features, filtered for the running platform. Update this list before each release; no historical releases are retained.

Implementation

List<WhatsNewFeature> currentWhatsNewFeatures() =>
    [
          WhatsNewFeature(
            icon: Icons.wifi,
            title: t.newFeatures.campusWifi.title,
            description: t.newFeatures.campusWifi.iosDescription,
            availablePlatforms: const {.iOS},
          ),
          WhatsNewFeature(
            icon: Icons.wifi,
            title: t.newFeatures.campusWifi.title,
            description: t.newFeatures.campusWifi.androidDescription,
            availablePlatforms: const {.android},
          ),
          WhatsNewFeature(
            icon: Icons.widgets_outlined,
            title: t.newFeatures.androidWidget.title,
            description: t.newFeatures.androidWidget.description,
            availablePlatforms: const {.android},
          ),
          WhatsNewFeature(
            icon: Icons.map_outlined,
            title: t.newFeatures.campusMap.title,
            description: t.newFeatures.campusMap.description,
          ),
          WhatsNewFeature(
            icon: Icons.download_outlined,
            title: t.newFeatures.materialDownload.title,
            description: t.newFeatures.materialDownload.description,
          ),
          WhatsNewFeature(
            icon: Icons.groups_outlined,
            title: t.newFeatures.ntutSu.title,
            description: t.newFeatures.ntutSu.description,
          ),
        ]
        .where(
          (feature) =>
              feature.availablePlatforms?.contains(defaultTargetPlatform) ??
              true,
        )
        .toList();