1
Guys, I’m new to the flutter language and I have the following problem. As the image below, the client asked that instead of loading, he should be passing 3 messages, as if it were a slide. How do I do this in flutter or what technique can I use to get this result on a splash screen? Example: X seconds [Message A], Y seconds [Mensagm b] and so on...
This message I created within a expand
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
CircularProgressIndicator(),
Padding(padding: EdgeInsets.only(top: 20.0)),
Text(" Carregando... \n Aguarde um momento por favor!", style: Style.H5,),
],
),
)
Turn the screen into a Statefullwidget, use Setstate() to redesign the screen and exchange messages. There the controller and the timer will depend on your programming.
– GabrielLocalhost
I had to create a guy to give x second so he jump to next screen would be more or less that way? @override void initState(){ super.initState(); Timer(Duration(Seconds: 5), () => Navigator.pushReplacement(context, Materialpageroute(Builder: (context) => Home())); }
– Thiago Correa
Does not do everything on the same screen, option = 1; after 3 seconds option = 2; then option = 3; and at each option Voce writes something different, use Statefullwidget to change the screen state
– GabrielLocalhost
Can be good using a stream
– mrocigno
If we answer you we will earn about 10% of the amount the customer pays you xD?? Do the same as @Gabriellocalhost said, turn your screen into a
StatefulWidget
, create a list of the texts you want and Timer, you don’t change the screen, but yes you dosetState(() count++)
and to display the text you doText(minhaList[count])
– Matheus Ribeiro