setMockInitialValues static method

  1. @visibleForTesting
DeviceInfoPlugin setMockInitialValues({
  1. AndroidDeviceInfo? androidDeviceInfo,
  2. IosDeviceInfo? iosDeviceInfo,
  3. LinuxDeviceInfo? linuxDeviceInfo,
  4. WebBrowserInfo? webBrowserInfo,
  5. MacOsDeviceInfo? macOsDeviceInfo,
  6. WindowsDeviceInfo? windowsDeviceInfo,
})

Initializes the application metadata with mock values for testing.

Implementation

@visibleForTesting
static DeviceInfoPlugin setMockInitialValues({
  AndroidDeviceInfo? androidDeviceInfo,
  IosDeviceInfo? iosDeviceInfo,
  LinuxDeviceInfo? linuxDeviceInfo,
  WebBrowserInfo? webBrowserInfo,
  MacOsDeviceInfo? macOsDeviceInfo,
  WindowsDeviceInfo? windowsDeviceInfo,
}) {
  final DeviceInfoPlugin deviceInfoPlugin = DeviceInfoPlugin();
  deviceInfoPlugin._cachedAndroidDeviceInfo = androidDeviceInfo;
  deviceInfoPlugin._cachedIosDeviceInfo = iosDeviceInfo;
  deviceInfoPlugin._cachedLinuxDeviceInfo = linuxDeviceInfo;
  deviceInfoPlugin._cachedWebBrowserInfo = webBrowserInfo;
  deviceInfoPlugin._cachedMacosDeviceInfo = macOsDeviceInfo;
  deviceInfoPlugin._cachedWindowsDeviceInfo = windowsDeviceInfo;
  return deviceInfoPlugin;
}