getPlatformName function
Returns the name of the current platform.
Implementation
Future<String> getPlatformName() async {
final platformName = await _platform.getPlatformName();
if (platformName == null) throw Exception('Unable to get platform name.');
return platformName;
}