Created
May 12, 2019 20:30
-
-
Save jacobaraujo7/2d1f31c5425855037fb8986702f69fa6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ValueBloc extends BlocBase { | |
StreamController<double> _valueController = StreamController<double>(); | |
double value = 0.0; | |
onChangeValue(double v) { | |
value = v; | |
_valueController.add(value); | |
} | |
//será chamado no fim da aplicação automaticamente | |
@override | |
void dispose() { | |
_valueController.close(); | |
super.dispose(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment