initAsync static method
Collect all the Device's information.
Implementation
static Future<Map<String, dynamic>> initAsync() async {
//
if (_init) {
return _deviceParameters;
}
_init = true;
if (UniversalPlatform.isAndroid || UniversalPlatform.isIOS) {
// Supply the device's unique identifier.
_deviceId = await UniqueIdentifier.serial;
}
final info = await DeviceInfoPlugin().deviceInfo;
return _deviceParameters =
info.data.map((key, value) => MapEntry(key, value.toString()));
}