registerToStream method

Future<StreamSubscription<List<String>>> registerToStream(
  1. Function callback
)

Implementation

Future<StreamSubscription<List<String>>> registerToStream(
    Function callback) async {
  StreamSubscription<List<String>> subscription =
      _searchTerms.stream.listen(callback);
  // Make sure to call cart changed this time
  var terms = await SearchTermsDao().get();
  searchTermsChanged(terms);
  return subscription;
}