widget_driver_annotation 1.0.2 copy "widget_driver_annotation: ^1.0.2" to clipboard
widget_driver_annotation: ^1.0.2 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
160
pub points
26%
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