how to stop listening Stream in flutter code example
Example: flutter stream stop listen
// Pre-declare variable (can't be final, though).
StreamSubscription<Map<PlaceParam, dynamic>> subscription;
subscription = stream.listen((event) {
.... subscription.cancel();
});