widget_driver_generator 0.0.3 widget_driver_generator: ^0.0.3 copied to clipboard
This package provides generators for WidgetDriver to automate the creation of your TestDrivers and WidgetDriverProviders
Implement a Driver
inside your project #
@GenerateTestDriver()
class MyDriver extends WidgetDriver {
...
@TestDriverDefaultValue(1)
int get value => _someService.value;
@TestDriverDefaultValue()
void doSomething() {
...
}
@TestDriverDefaultValue('The string')
String giveMeSomeString() {
return _someService.getSomeString();
}
@TestDriverDefaultFutureValue(123)
Future<int> giveMeSomeIntSoon() {
return _someService.getSomeIntSoon();
}
}
Generate the code #
In order to generate TestDrivers and WidgetDriverProviders just run this command:
flutter pub run build_runner build