instance property

DeviceVendorInfoLoader get instance

Get current instance for fetching hardware information.

If the instance getter called directly, it will aggigned real DeviceVendorInfoLoader which disallowed for running testes.

Moreover, this library only supported Windows, macOS and Linux. Running unsupported platform will lead to throws UnsupportedError.

Implementation

static DeviceVendorInfoLoader get instance {
  _instance ??= _releaseLoader;

  return _instance!;
}
set instance (DeviceVendorInfoLoader? newInstance)

Change DeviceVendorInfoLoader instance for future uses.

If newInstance assigned as Null, it will assign productive version of DeviceVendorInfoLoader or throwning UnsupportedError if using under unsupported platform.

Implementation

static set instance(DeviceVendorInfoLoader? newInstance) {
  _instance = newInstance ?? _releaseLoader;
}