felangel / felangel/flow_builder

.set in addition to .update

Aperta
#80 0 commenti 1 reazione 0 assegnatari Vedi su GitHub
Lingua principale
Dart
Stelle
416
Fork
68
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

**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.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.