init static method
Collect all the Device's information.
Implementation
@Deprecated('Replaced by initAsync for API consistency.')
static Future<Map<String, dynamic>> init() async {
if (_init) {
return _deviceParameters;
}
_init = true;
// Running in the Web.
if (kIsWeb) {
return _deviceParameters;
}
if (UniversalPlatform.isAndroid) {
final info = await DeviceInfoPlugin().androidInfo;
_loadAndroidParameters(info);
} else if (UniversalPlatform.isIOS) {
final info = await DeviceInfoPlugin().iosInfo;
_loadiOSParameters(info);
} else if (UniversalPlatform.isWindows) {
} else if (UniversalPlatform.isFuchsia) {
} else if (UniversalPlatform.isLinux) {
} else if (UniversalPlatform.isMacOS) {}
return _deviceParameters;
}