felangel / felangel/flow_builder

.set in addition to .update

Open
#80 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Dart
Stars
416
Forks
68
PR merge metrics
No merged PRs in 30d

Description

**Is your feature request related to a problem? Please describe.**
Whenever I want to transition to a new flow state without caring about the current flow state, I don't want to write more code of the form:
```dart
context
.flow()
.update((currentStateIDontCareAbout) => NewState())
```

**Describe the solution you'd like**
I'd like to see a more consise version of the form:
```dart
context
.flow()
.set(NewState())
```

This isn't a _big_ deal -- just seems like a natural function to have.

PS.
I know I can use `.update((_) => NewState())` to make it more concise, but I'd just pass in the state directly.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.