layout_tester library
Classes
- ComposeTargetId
- Special identifier which is used to build traits within WidgetTrait.withParents.
- CustomTraitAssert
- Customizable assert class.
- DoublePair
- Specialisation of ValuePair for double.
-
FailedAssertionInfo<
T> - Holds the info about an assertion failure on a specific field.
- LayoutTester
- PositionAssert
- Describes the position of a widget targeted by WidgetTrait.
- RelationAssert
- Describes the state of a widget in relation to a specified value.
- RelativePositionAssert
- Describes the relative position of a widget targeted by WidgetTrait.
- RelativeSizeAssert
- Describes the relative size of a widget targeted by WidgetTrait.
- RelativeTraitAssert
- Base class for relative assertions on WidgetTrait.
- SizeAssert
- Describes the size of a widget targeted by WidgetTrait.
- TargetId
- Identifier for a widget in a WidgetTrait.
- TraitAssert
- Base class for assertions on WidgetTrait.
-
ValuePair<
T> - Represents a pair of equally typed values.
- WidgetTrait
- Describes a widget regarding its layout specific properties.
Enums
- PositionReference
- Defines possible references for RelativePositionAssert.
- PropertyRelation
- List of possible relations for RelationAssert.
Functions
-
qualifyTarget<
T extends Widget> ({Key? key, String? id, int? elementIndex, List< TraitAssert> asserts = const [], List<WidgetTrait> descendants = const []}) → WidgetTrait -
Creates an instance of WidgetTrait with a target of type
T
. -
testLayout(
WidgetTester tester, Set< WidgetTrait> traits) → void - Runs the layout test logic without the need to create a LayoutTester manually.
Typedefs
- WidgetLocator = bool Function(Widget widget)
- Used to identify a specific widget.
Exceptions / Errors
- AssertionFailedException
- Contains information about a failing assertion.
- LayoutTesterException
- Base class for all layout_tester related exceptions.
- UnknowWidgetTraitException
- Exception which indicates the missing of an expected widget.