setSurfaceSize method
Artificially changes the surface size to size
on the Widget binding,
then flushes microtasks.
Set to null to use the default surface size.
Implementation
Future<void> setSurfaceSize(Size size) {
return TestAsyncUtils.guard<void>(() async {
assert(inTest);
if (_surfaceSize == size)
return;
_surfaceSize = size;
handleMetricsChanged();
});
}