getPlatformVersion method Null safety

Future<String> getPlatformVersion()

Returns a String containing the version of the platform.

Implementation

Future<String> getPlatformVersion() {
  final version = html.window.navigator.userAgent;
  return Future.value(version);
}