How to create messages using Futuredelayed?

Asked

Viewed 57 times

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...

inserir a descrição da imagem aqui

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.

  • 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())); }

  • 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

  • Can be good using a stream

  • 2

    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 do setState(() count++) and to display the text you do Text(minhaList[count])

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.