initAsync static method

Future<Map<String, dynamic>> initAsync()

Collect all the Device's information.

Implementation

static Future<Map<String, dynamic>> initAsync() async {
  //
  if (_init) {
    return _deviceParameters;
  }

  _init = true;

  // _deviceId = await UniqueIdentifier.serial;

  final info = await DeviceInfoPlugin().deviceInfo;

  return _deviceParameters =
      info.data.map((key, value) => MapEntry(key, value.toString()));
}