withEnabled method

  1. @useResult
WidgetSelector<ElevatedButton> withEnabled(
  1. bool? value
)

Creates a WidgetSelector that finds all ElevatedButton where enabled equals (==) value.

Example usage:

spot<ElevatedButton>().withEnabled(true).existsOnce();

Implementation

@useResult
WidgetSelector<ElevatedButton> withEnabled(bool? value) {
  return withDiagnosticProp<bool>(
      'enabled', (it) => value == null ? it.isNull() : it.equals(value));
}