getCenter method

Future<DriverOffset> getCenter (SerializableFinder finder, { Duration timeout })

Returns the point at the center of the widget identified by finder.

The offset is expressed in logical pixels and can be translated to device pixels via Window.devicePixelRatio.

Implementation

Future<DriverOffset> getCenter(SerializableFinder finder, { Duration timeout }) async {
  return _getOffset(finder, OffsetType.center, timeout: timeout);
}