getValues static method

List<DeviceOverviewTab> getValues(
  1. BuildContext context
)

Returns the list of tabs to be displayed in the device overview page.

This method takes feature flags into account when deciding which tabs to include.

Implementation

static List<DeviceOverviewTab> getValues(BuildContext context) {
  final container = ProviderScope.containerOf(context, listen: false);
  final additionalResourcesEnabled =
      container.read(additionalResourcesEnabledFlag);

  return [
    DeviceOverviewTab.details,
    DeviceOverviewTab.maintenance,
    if (additionalResourcesEnabled) DeviceOverviewTab.additionalResources,
  ];
}