getCenter method

Future<DriverOffset> getCenter(
  1. SerializableFinder finder,
  2. {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 dart:ui.FlutterView.devicePixelRatio.

Implementation

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