passsy / spot

Chainable powerful Flutter widget selector API, screenshots and assertions for awesome widget tests.
https://pub.dev/packages/spot
Apache License 2.0
62 stars 1 forks source link

Add @useResult to all methods that return WidgetSelector #32

Closed passsy closed 8 months ago

passsy commented 8 months ago

WidgetSelectors do nothing until they are snapshotted. Not using the selector is therefore a mistake or unnecessary

spot<FloatingActionButtion>(); // does nothing, warning

final fab = spot<FloatingActionButtion>(); // ok
spot<FloatingActionButtion>().existsOnce(); // ok