wait_for
Pause test execution until a widget appears or disappears in a live Flutter app. Set gone to true to wait for elements like loading spinners to vanish, ensuring reliable assertions before proceeding.
Instructions
Waits for a widget to appear or disappear. Set gone=true to wait for disappearance (e.g. loading spinners).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| gone | No | If true, waits for the widget to disappear instead of appear | |
| target | No | Target string (e.g. '#loginBtn', 'text="Submit"', 'type="ElevatedButton"', 'semanticsLabel="Username"') | |
| timeout | No | Timeout in milliseconds | |
| timeout_ms | No | Implicit wait timeout in milliseconds before failing |