ensureVisible method
Implementation
Future<void> ensureVisible(dynamic target, {Screenshot? screenshot}) async {
var finder = targetToFinder(target, skipOffStage: false);
await tester.ensureVisible(finder);
await pumpAndSettle();
await _screenshotIfNeeded(screenshot);
}