* drafting toolbar with practice * moved some code around * turning overlay message content into text buttons for selection, updated toolbar buttons progress bar * activities displaying and forwarding toolbar * experimenting with using choice value rather than index for logic * reimplementation of wordnet results and translation for individual words * cache and timer * mostly done with activities in toolbar flow --------- Co-authored-by: ggurdin <ggurdin@gmail.com> Co-authored-by: choreo development <williamjordan-cooley@Williams-MacBook-Pro-3.local>
18 lines
334 B
Dart
18 lines
334 B
Dart
import 'dart:async';
|
|
|
|
class BaseController<T> {
|
|
final StreamController<T> stateListener = StreamController<T>();
|
|
late Stream<T> stateStream;
|
|
|
|
BaseController() {
|
|
stateStream = stateListener.stream.asBroadcastStream();
|
|
}
|
|
|
|
dispose() {
|
|
stateListener.close();
|
|
}
|
|
|
|
setState(T data) {
|
|
stateListener.add(data);
|
|
}
|
|
}
|