widget_driver_annotation 1.0.3 copy "widget_driver_annotation: ^1.0.3" to clipboard
widget_driver_annotation: ^1.0.3 copied to clipboard

Defines the annotations used by widget_driver and widget_driver_generator to create code for your WidgetDrivers

example/README.md

WidgetDriver annotation usage #

@GenerateTestDriver()
class CounterDriver extends WidgetDriver {
    final SomeModel model;

    CounterDriver({
        @driverProvidableProperty required this.model,
    })

    @TestDriverDefaultValue(1)
    int get value => _counterService.value;

    @TestDriverDefaultValue()
    void increment() {
        _counterService.increment();
    }

    @TestDriverDefaultValue(false)
    bool doSomething() {
        return _counterService.doSomething();
    }

    @TestDriverDefaultFutureValue(1)
    Future<int> incrementInTheFutureAndReturnValue() {
        return _counterService.incrementInTheFutureAndReturnValue();
    }
}

See the documentation for widget_driver to understand how these annotations work and how you can configure and use them.

1
likes
140
pub points
24%
popularity

Publisher

verified publisherbmwtech.dev

Defines the annotations used by widget_driver and widget_driver_generator to create code for your WidgetDrivers

Repository (GitHub)
View/report issues
Contributing

Documentation

API reference

License

MIT (LICENSE)

More

Packages that depend on widget_driver_annotation