Skip to content

Commit

Permalink
fix atomAction
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobaraujo7 committed Aug 6, 2024
1 parent a420f87 commit 848ec14
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [2.0.1] - 2024-06-26
## [2.0.2] - 2024-08-06

- Fix: **atomAction** now returning **FutureOr**.
- Fix: propertie **when** in **useAtomState** hook;
Expand Down
8 changes: 4 additions & 4 deletions lib/src/functions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Atom<T> asyncSelector<T>(
/// counterAction();
/// ```
AtomAction atomAction(
FutureOr<void> Function(SetState set) scope, {
FutureOr Function(SetState set) scope, {
String? key,
}) {
return _AtomAction(scope, key ?? 'atomAction');
Expand All @@ -123,7 +123,7 @@ AtomAction atomAction(
/// counterAction();
/// ```
AtomAction1<A> atomAction1<A>(
FutureOr<void> Function(SetState set, A action) scope, {
FutureOr Function(SetState set, A action) scope, {
String? key,
}) {
return _AtomAction1<A>(scope, key ?? 'atomAction1');
Expand All @@ -150,7 +150,7 @@ AtomAction1<A> atomAction1<A>(
/// counterAction();
/// ```
AtomAction2<A1, A2> atomAction2<A1, A2>(
FutureOr<void> Function(SetState set, A1 arg1, A2 arg2) scope, {
FutureOr Function(SetState set, A1 arg1, A2 arg2) scope, {
String? key,
}) {
return _AtomAction2<A1, A2>(scope, key ?? 'atomAction2');
Expand All @@ -177,7 +177,7 @@ AtomAction2<A1, A2> atomAction2<A1, A2>(
/// counterAction();
/// ```
AtomAction3<A1, A2, A3> atomAction3<A1, A2, A3>(
FutureOr<void> Function(
FutureOr Function(
SetState set,
A1 arg1,
A2 arg2,
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: asp
description: ASP (Atomic State Pattern) offers a simplified, Predictable and Powerful State Management for Flutter.
version: 2.0.1
version: 2.0.2
homepage: https://github.com/Flutterando/asp
documentation: https://asp.flutterando.com.br
topics: [state-management]
Expand Down

0 comments on commit 848ec14

Please sign in to comment.