Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rayliverified/FSM
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: Codelessly/FSM
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Mar 26, 2025

  1. Verified

    This commit was signed with the committer’s verified signature.
    BirjuVachhani Birju Vachhani
    Copy the full SHA
    b43d7b1 View commit details
Showing with 8 additions and 4 deletions.
  1. +8 −4 lib/f_listener_mixin.dart
12 changes: 8 additions & 4 deletions lib/f_listener_mixin.dart
Original file line number Diff line number Diff line change
@@ -186,10 +186,12 @@ mixin FStreamSubscriberMixin {
}

/// Cancels all streams that were previously added with listen().
void cancelSubscriptions() {
Future<void> cancelSubscriptions() async {
final List<Future> futures = [];
for (var subscription in _streamSubscriptions) {
subscription.cancel();
futures.add(subscription.cancel());
}
await Future.wait(futures);
}
}

@@ -218,10 +220,12 @@ mixin FStreamSubscriberStateMixin<T extends StatefulWidget> on State<T> {
}

/// Cancels all streams that were previously added with listen().
void cancelSubscriptions() {
Future<void> cancelSubscriptions() async {
final List<Future> futures = [];
for (var subscription in _subscriptions) {
subscription.cancel();
futures.add(subscription.cancel());
}
await Future.wait(futures);
}
}