I try to run 2 Functions when I press the login button, but don't work
I'm use MobX, and here is my code:
Observer(builder: (_) {
return ElevatedButton(
onPressed:
dadosLogin.apertouLogin as void Function()?,
child: dadosLogin.carregando
? SizedBox(
height: altura / 40,
width: largura / 20,
child: CircularProgressIndicator(
strokeWidth: largura / 200,
valueColor: AlwaysStoppedAnimation(
Color(0xFFFFFFFF),
),
),
)
: Text(
"LOGIN",
style: TextStyle(),
),
);
With this code I run only this:
@computed
Function? get apertouLogin =>
(loginOK && !carregando && senhaOK) ? logando : null;
But, i'm need this to
@computed
Function? get puxandoLogin => (!carregando) ? puxando : null;
This:
onPressed: () {
functionOne as void Function();
functionTwo as void Function();
}
Don't work
onPressed: () {
functionOne as void Function();
functionTwo as void Function();
}
User contributions licensed under CC BY-SA 3.0