Created
April 10, 2020 19:25
-
-
Save guilhermecarvalhocarneiro/4bdc5d2ef4fb11ad7d3f62960ee81f7a to your computer and use it in GitHub Desktop.
MobX para controlar a exibição ao não de um modal de processamento em flutter.
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
abstract class _ProcessingControllerBase with Store { | |
// Declarando os atributos do controller | |
// Atributo para determinar quando está sendo processo alguma tarefa assíncrona. | |
@observable | |
bool processing = true; | |
// Declarando a Action para informar que o processamento iniciou | |
@action | |
beginProcessing() async => this.processing = true; | |
// Declarando a Action para informar que o processamento parou | |
@action | |
endProcessing() async => this.processing = false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment