Commit fd3e0b7e authored by Michael Goderbauer's avatar Michael Goderbauer Committed by GitHub

Add option to get Dart VM flags from flutter_driver. (#7378)

parent 5b1e7c0a
......@@ -314,6 +314,30 @@ class FlutterDriver {
return BASE64.decode(result['screenshot']);
}
/// Returns the Flags set in the Dart VM as JSON.
///
/// See the complete documentation for `getFlagList` Dart VM service method
/// [here][getFlagList].
///
/// Example return value:
///
/// [
/// {
/// "name": "timeline_recorder",
/// "comment": "Select the timeline recorder used. Valid values: ring, endless, startup, and systrace.",
/// "modified": false,
/// "_flagType": "String",
/// "valueAsString": "ring"
/// },
/// ...
/// ]
///
/// [getFlagList]: https://github.com/dart-lang/sdk/blob/master/runtime/vm/service/service.md#getflaglist
Future<List<Map<String, dynamic>>> getVmFlags() async {
Map<String, dynamic> result = await _peer.sendRequest('getFlagList');
return result['flags'];
}
/// Starts recording performance traces.
Future<Null> startTracing({List<TimelineStream> streams: _defaultStreams}) async {
assert(streams != null && streams.length > 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment