allWidgets top-level property
A WidgetSelector that matches all widgets in the widget tree.
final globalKeyWidgets = allWidgets
.whereWidget(
(widget) => widget.key is GlobalKey,
description: 'with GlobalKey',
)
.snapshot();
print(globalKeyWidgets.discoveredWidgets);
// [View-[GlobalObjectKey TestFlutterView#81689],
// WidgetsApp-[GlobalObjectKey _MaterialAppState#5b870],
// ...
Implementation
@Deprecated('Use spotAllWidgets()')
WidgetSelector<Widget> get allWidgets => WidgetSelector.all;