getVersion method

Future<FlutterVersion> getVersion()

Implementation

Future<FlutterVersion> getVersion() async {
  final versionStr =
      (await runAsync(["--version", "--machine"])).stdout.toString().trim();

  final json = jsonDecode(versionStr);
  return FlutterVersion.fromJson(json);
}