How do I stop listening to HTML events, in Dart? -
i listening click events this:
element.onclick.listen((e) => docoolstuff()); how stop listening?
because onclick returns streamsubscription, can cancel() stop receiving events.
here example:
import 'dart:async'; // ... var subscription = element.onclick.listen((e) => docoolstuff()); // later subscription.cancel(); dart
No comments:
Post a Comment