Last active
August 2, 2020 18:27
-
-
Save lironhl/afe615485d0cb37b5b3ffeb5f1569656 to your computer and use it in GitHub Desktop.
A proposed fix for https://gist.github.com/slightfoot/094657bb22e986bbb4c9bafd9841cbd8, Dart (Flutter) and Sentry example.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//... | |
Map<dynamic, dynamic> deviceInfo = {}; | |
if (defaultTargetPlatform == TargetPlatform.android) { | |
deviceInfo = await DeviceInfoPlugin.channel.invokeMethod('getAndroidDeviceInfo'); | |
} else if (defaultTargetPlatform == TargetPlatform.iOS) { | |
deviceInfo = await DeviceInfoPlugin.channel.invokeMethod('getIosDeviceInfo'); | |
} | |
extra['device_info'] = deviceInfo.map((key, value) => MapEntry(key.toString(), value.toString())); | |
//... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment