Closed passsy closed 8 months ago
Yes, use hasWidgetProp
extension EffectiveTextMatcher on WidgetMatcher<TronButton> {
// ignore: avoid_positional_boolean_parameters
WidgetMatcher<TronButton> isTappable(bool value) {
return hasWidgetProp(
prop: widgetProp('isTappable', (w) => w.onTap != null),
match: (it) => it.equals(value),
);
}
}
I want to check if
TronButton.onTap
is set or not.Old API (0.6.0)
Still not great with
hasProp(widgetSelector: )
(spot 0.7.0)Can we improve this?