WidgetMatcher<W extends Widget> class
abstract
A representation of a single Widget found by a WidgetSnapshot with direct access to its element and the original selector.
Provides access to the underlying Element, WidgetSelector, and the widget instance itself for more detailed assertions and manipulations.
For WidgetSnapshot with multiple matched widgets, use MultiWidgetMatcher.
- Available Extensions
- AlignGetter
- AlignMatcher
- AnyTextGetter
- AnyTextMatcher
- CircularProgressIndicatorGetter
- CircularProgressIndicatorMatcher
- ColumnGetter
- ColumnMatcher
- ConstrainedBoxGetter
- ConstrainedBoxMatcher
- ContainerGetter
- ContainerMatcher
- DefaultWidgetMatchers
- DiagnosticPropWidgetMatcher
- EditableTextGetter
- EditableTextMatcher
- EffectiveTextMatcher
- ElevatedButtonGetter
- ElevatedButtonMatcher
- FloatingActionButtonGetter
- FloatingActionButtonMatcher
- GridViewGetter
- GridViewMatcher
- IconButtonGetter
- IconButtonMatcher
- IconGetter
- IconMatcher
- ImageGetter
- ImageMatcher
- LinearProgressIndicatorGetter
- LinearProgressIndicatorMatcher
- ListTileGetter
- ListTileMatcher
- OpacityGetter
- OpacityMatcher
- OutlinedButtonGetter
- OutlinedButtonMatcher
- RowGetter
- RowMatcher
- SafeAreaGetter
- SafeAreaMatcher
- SelectableTextGetter
- SelectableTextMatcher
- SemanticsGetter
- SemanticsMatcher
- SizedBoxGetter
- SizedBoxMatcher
- SliderGetter
- SliderMatcher
- SwitchGetter
- SwitchMatcher
- TextButtonGetter
- TextButtonMatcher
- TextFieldGetter
- TextFieldMatcher
- TextGetter
- TextMatcher
- TooltipGetter
- TooltipMatcher
- WidgetMatcherExtensions
- WrapGetter
- WrapMatcher
Constructors
-
WidgetMatcher({required Element element, required WidgetSelector<
W> selector}) -
Factory constructor to create a WidgetMatcher from an Element and a
WidgetSelector.
factory
-
WidgetMatcher.fromSnapshot(WidgetSnapshot<
W> snapshot) -
Factory constructor to create a WidgetMatcher from a WidgetSnapshot.
factory
Properties
- element → Element
-
The Element associated with the matched widget.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
selector
→ WidgetSelector<
W> -
The WidgetSelector that was used to find this widget.
no setter
- widget → W
-
The actual widget instance of type
W
that was matched.no setter
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited