isCapabilityEnabled method

bool isCapabilityEnabled(
  1. ConnectionType connection
)

Implementation

bool isCapabilityEnabled(ConnectionType connection) {
  switch (connection) {
    case ConnectionType.wifi:

      /// When configuring via WiFi, the user should not  be
      /// able to change any wifi settings
      if (LogbotSetupEnv().type == SetupType.wifi) {
        return false;
      }
      return widget.capabilities.wifi ?? false;
    case ConnectionType.modem:
      return widget.capabilities.modem ?? false;
    case ConnectionType.ethernet:
      return widget.capabilities.wan ?? false;
    default:
      return false;
  }
}