Skip to content

Instantly share code, notes, and snippets.

@vreamer
Created August 26, 2020 08:23
Show Gist options
  • Save vreamer/65112c065cdd5c485d7b033a42fe2ff5 to your computer and use it in GitHub Desktop.
Save vreamer/65112c065cdd5c485d7b033a42fe2ff5 to your computer and use it in GitHub Desktop.
import 'dart:async';
class DataService {
StreamController<String> ideaController;
static final DataService instance = DataService._init();
DataService._init() {
ideaController = StreamController();
}
addIdea(String newIdea) {
ideaController.add(newIdea);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment