deviceInfo method
Device + OS + app context (osType, osVersion, deviceModel, appVersion, …).
Implementation
@override
Future<Map<String, Object?>> deviceInfo() async {
try {
final res = await methodChannel.invokeMethod<Map<dynamic, dynamic>>(
'deviceInfo',
);
return (res ?? {}).map((k, v) => MapEntry(k.toString(), v as Object?));
} catch (_) {
return <String, Object?>{};
}
}