Drives a Flutter Application running in another process.

Static Methods

connect({String dartVmServiceUrl, bool printCommunication: false, bool logCommunicationToFile: true }) Future<FlutterDriver>

Connects to a Flutter application.


FlutterDriver.connectedTo(VMServiceClient _serviceClient, Peer _peer, VMIsolateRef _appIsolate, { bool printCommunication: false, bool logCommunicationToFile: true })

Creates a driver that uses a connection provided by the given _serviceClient, _peer and _appIsolate.


hashCode int

The hash code for this object.

read-only, inherited
runtimeType Type

A representation of the runtime type of the object.

read-only, inherited


operator ==(other) bool

The equality operator.



checkHealth({Duration timeout }) Future<Health>

Checks the status of the Flutter Driver extension.

close() Future<Null>

Closes the underlying connection to the VM service.

getRenderTree({Duration timeout }) Future<RenderTree>

Returns a dump of the render tree.

getText(SerializableFinder finder, { Duration timeout }) Future<String>

Returns the text in the Text widget located by finder.

getVmFlags({Duration timeout: _kShortTimeout }) Future<List<Map<String, dynamic>>>

Returns the Flags set in the Dart VM as JSON.

runUnsynchronized<T>(Future<T> action(), { Duration timeout }) Future<T>

action will be executed with the frame sync mechanism disabled.

screenshot({Duration timeout }) Future<List<int>>

Take a screenshot. The image will be returned as a PNG.

scroll(SerializableFinder finder, double dx, double dy, Duration duration, { int frequency: 60, Duration timeout }) Future<Null>

Tell the driver to perform a scrolling action.

scrollIntoView(SerializableFinder finder, { double alignment: 0.0, Duration timeout }) Future<Null>

Scrolls the Scrollable ancestor of the widget located by finder until the widget is completely visible.

setInputText(SerializableFinder finder, String text, { Duration timeout }) Future<Null>

Sets the text value of the TextField widget located by finder.

startTracing({List<TimelineStream> streams: _defaultStreams, Duration timeout: _kShortTimeout }) Future<Null>

Starts recording performance traces.

stopTracingAndDownloadTimeline({Duration timeout: _kShortTimeout }) Future<Timeline>

Stops recording performance traces and downloads the timeline.

submitInputText(SerializableFinder finder, { Duration timeout }) Future<String>

Submits the current text value of the TextField widget located by finder.

tap(SerializableFinder finder, { Duration timeout }) Future<Null>

Taps at the center of the widget located by finder.

traceAction(Future action(), { List<TimelineStream> streams: _defaultStreams }) Future<Timeline>

Runs action and outputs a performance trace for it.

waitFor(SerializableFinder finder, { Duration timeout }) Future<Null>

Waits until finder locates the target.

waitUntilNoTransientCallbacks({Duration timeout }) Future<Null>

Waits until there are no more transient callbacks in the queue.

noSuchMethod(Invocation invocation) → dynamic

Invoked when a non-existent method or property is accessed.

toString() String

Returns a string representation of this object.