Skip to main content

use_in_case 3.0.0 copy "use_in_case: ^3.0.0" to clipboard
use_in_case: ^3.0.0 copied to clipboard

A Dart package that provides a set of functionality to help you write usecases.

0.1.0 #

Core Classes #

Examples

Tests

1.0.0 #

I'm glad to announce that Versin 2 has reached its initial state that can be published!

Core Classes #

Examples #

Documentation #

Cleanup #

Removed pretty much all dependencies from the pubspec except darz for the unit type. Removed use_in_case2.0 branch from git-workflow filter.

1.1.0 #

Documentation #

Breaking Changes #

errorMessage parameter in timeout modifier has been migrated to be a lazily-invoked callback due to unnecessary evaluation.

1.2.0 #

  • Removed documentation of deprecated method debounceBusyState in README.md
  • Updated example to call getOrThrow instead of execute.
  • Renamed execute interactor to runUnsafe
  • Edited documentation to match the new interactor signature.

1.2.1 #

  • Added map to library export

1.3.0 #

1.4.0 #

1.4.1 #

Bugfixes #

Re-invocation of callback provided as parameter in checkedIntercept is now awaited when called.

Examples #

Features #

New parameter allowMultiCatch added to the following function signatures:

Branding #

Shortened package description

1.4.2 #

Features #

Intercept #

allowMultiCatch has been renamed to consume. By default, all intercept-functions will consume exceptions and rethrow a HandledException in order to filter out previously caught exception types. Note that this behavior can be customized by providing false as parameter.

1.4.3 #

Bugfixes #

There was a bug in 'logEvents' that consumed exceptions event though they should've forwarded to the interception call.

1.4.4 #

Features #

continue-with #

continueWith has been added to the library. Its purpose is to continue the execution flow of an interactor regardless of the result. It's callback produces an output having the outcome passed as parameter in order for you to decide what to continue with.

Function: here
Example: here
Test: here

2.0.0 #

Breaking Changes #

  • Removed the dartz dependency. ResultInteractor and Interactor now share the ParameterizedResultInteractor base and can be invoked without passing an input. All modifiers remain extensions on that shared contract.
  • Parameterized interactor implementations now implement invoke(input); call sites continue to use getOrThrow(input).
  • Replaced dartz's Either in continueWith with the sealed InteractorOutcome hierarchy: InteractorSuccess and InteractorFailure.
  • Progress interactors without input now extend ResultProgressInteractor and expose a no-argument getOrThrow().

See the README and examples for updated usage.

2.1.0 #

Breaking Changes #

  • Interactor implementations now extend the shared abstract base classes and provide execute consistently. No-input interactors accept the opaque NoInput marker in execute, while callers continue to invoke them without an argument.
  • invoke is now an adapter over the shared interactor contract rather than an implementation method.

3.0.0 #

Breaking Changes #

  • InteractorContract, ParameterizedResultInteractor and ResultInteractor (and therefore ParameterizedInteractor and Interactor) are now interfaces. Interactors must implement them instead of extending them.
  • Progress interactors (ParameterizedResultProgressInteractor, ResultProgressInteractor and their typedefs) are no longer interactors themselves. The only method available on them is receiveProgress, which returns a regular interactor that supports all modifiers and invocation methods.
  • Progress interactors must still be extended to inherit emitProgress; subclasses must be declared final, base or sealed.

Changes #

  • Calling receiveProgress multiple times on the same progress interactor instance no longer throws. The latest callback replaces the previous one.
3
likes
160
points
314
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A Dart package that provides a set of functionality to help you write usecases.

Repository (GitHub)
View/report issues

Topics

#dart #utility

License

BSD-3-Clause (license)

More

Packages that depend on use_in_case