getPlatform method
Returns platform name in which library is loaded.
Implementation
Future<String> getPlatform() async {
try {
final Map<dynamic, dynamic> result =
await _methodChannel.invokeMethod('getPlatform');
return result['platform'];
} on PlatformException catch (e, stack) {
print("Plugin getPlatform error: ${e.message}");
return Future.error("getPlatform failed.", stack);
}
}