diff --git a/CHANGELOG.md b/CHANGELOG.md index 415ed2c..d5432d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +[7.1.0] 27.11.2024 +* adding `isExecutingSync` to allow better chaining of commands [7.0.1] 27.11.2024 * ensure that isExecuting is set back to false before we notify any result listeners. [7.0.0] 14.11.2024 diff --git a/lib/flutter_command.dart b/lib/flutter_command.dart index ff7749e..c337dad 100644 --- a/lib/flutter_command.dart +++ b/lib/flutter_command.dart @@ -356,8 +356,13 @@ abstract class Command extends CustomValueNotifier { _commandResult; /// `ValueListenable` that changes its value on any change of the execution - /// state change of the command + /// state change of the command, to allow the UI to easier update its state + /// this property is updated asyncronously ValueListenable get isExecuting => _isExecutingAsync; + + /// `ValueListenable` that changes its value on any change of the execution + /// like [isExecuting] but synchronous. If you want to use this as a trigger + /// or a restriction for another command, you should use this property. ValueListenable get isExecutingSync => _isExecuting; /// `ValueListenable` that changes its value on any change of the current diff --git a/pubspec.yaml b/pubspec.yaml index 9b10664..a1635ad 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_command description: flutter_command is a way to manage your state based on `ValueListenable` and the `Command` design pattern. -version: 7.0.1 +version: 7.1.0 homepage: https://github.com/escamoteur/flutter_command environment: