getDeviceInfo static method

Future<void> getDeviceInfo()

Collect the device's information.

Implementation

static Future<void> getDeviceInfo() async {
  _packageInfo = await PackageInfo.fromPlatform();
  // There's 'no device' while testing and so don't collect device info.
  if (!inFlutterTest) {
    // Collect Device Information
    await DeviceInfo.initAsync();
  }
}