widget_driver library

Classes

AlwaysUseRealDriversTestConfig
Use this class in your WidgetDriver tests to always use real drivers and never use any test drivers.
BuildContext
A handle to the location of a widget in the widget tree.
DependencyResolver
You can use this class to resolve dependencies in your widgets/drivers. This class offers 2 approaches to help you write better tests:
DrivableWidget<Driver extends WidgetDriver>
A base class for widgets which can be driven by a WidgetDriver.
EmptyDefault
Extend this class when you need to provide a TestDefault implementation for a given type.
GenerateTestDriver
Use this annotation on your WidgetDriver to generate the code for the TestDriver and the DriverProvider.
MockDriverProvider<Driver extends WidgetDriver>
A widget you can use to provide a mock driver to your DrivableWidgets when you are testing them
RuntimeEnvironmentInfo
A helper class which gives you info about the environment for the current runtime.
TestDriver
A base class for the test version of the WidgetDrivers.
TestDriverDefaultFutureValue<T>
Use this annotation on properties/methods which return Futures in your Driver to generate the hardcoded default test values which will be used by the TestDriver. Your DrivableWidget will then use these values from the TestDriver when it is created during testing.
TestDriverDefaultValue<T>
Use this annotation on properties/methods in your Driver to generate the hardcoded default test values which will be used by the TestDriver. Your DrivableWidget will then use these values from the TestDriver when it is created during testing.
UseRealDriversForSomeTestConfig
Use this class in your WidgetDriver tests to use real drivers for some drivers. You can specify for which drivers you want to use the real driver by passing in the Type of these drivers into the useRealDriversFor parameter.
WidgetDriver
The WidgetDriver is the thing which drives your widget.
WidgetDriverProvider<Driver extends WidgetDriver>
This is a factory which knows how to create Drivers.
WidgetDriverTestConfig
Base class for defining test configuration for the WidgetDriver framework which is used during testing.
WidgetDriverTestConfigProvider
A widget you can use to provide a test configuration to your DrivableWidgets when you are testing them.

Constants

driverProvidableProperty → const _DriverProvidableProperty
Use this annotation on constructor params, which should be able to be passed from the DrivableWidget to the Driver. This is intended for model data and not repositories or other service/use-case types of objects.