provider_test library

A testing library which makes it easy to test providers.

Built after bloc_test package.

Functions

testProvider<P extends ChangeNotifier>(String description, {FutureOr<void> setUp()?, required P build(), FutureOr<void> seed(P provider)?, FutureOr<void> act(P provider)?, Duration? wait, Map<Object Function(P provider), List<Object>>? expect, FutureOr<void> verify(P provider)?, FutureOr<void> tearDown()?, dynamic tags}) → void
Creates a new provider-specific test case with the given description. testProvider will handle asserting that the provider changes its states to the expected states (in order) while act is executed. testProvider also ensures that no additional states are updated after act is executed by removing the listener added to the provider.