0

The customer requested that instead of the loading message ... 3 messages be passed. Today the screen is made as follows enter image description here

I would like to pass 3 messages in x seconds. Example: 5 following "hello" 10 seconds "hi"

My code link:

import 'package:filonaredapp/route.dart';
import 'package:filonaredapp/style/style.dart';
import 'package:filonaredapp/views/home.dart';
import 'package:filonaredapp/views/login.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:splashscreen/splashscreen.dart';
import 'dart:async';

void main() {
  runApp(MaterialApp(
  debugShowCheckedModeBanner: false,
  initialRoute: "/",
  routes: RouteDnx.RotasNomeadas,
  home: Main()));
  }

  class Main extends StatefulWidget {
  @override
  _MainState createState() => _MainState();
 }

class _MainState extends State<Main> {
var lista = ['Texto 1','Texto 2','Texto 3'];


    @override
    void initState(){
    super.initState();
    lista.length;
    Timer(Duration(seconds: 5), () => Navigator.pushReplacement(context,
    MaterialPageRoute(builder: (context) => Home())));

   }


 @override
  Widget build(BuildContext context) {
  return Scaffold(
  body: Stack(
    fit: StackFit.expand,
    children: <Widget>[
      Container(
        decoration: BoxDecoration(color: Style.CorFundoApp),
      ),
      Column(
        mainAxisAlignment: MainAxisAlignment.start,
        children: <Widget>[
          Expanded(
            flex: 2,
            child: Container(
              child: Column(
                mainAxisAlignment: MainAxisAlignment.center,
                children: <Widget>[
                  Image.asset("assets/images/logo-filonared.png"),
                  Padding(
                    padding: EdgeInsets.only(top: 10.0),
                  ),
                  Text("Filosofia na redação", style: Style.H4)
                 ],
                 ),
                 ),
                ),
              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,),
                       ],
                     ),
                     )
                     ],
                     )
                   ],
                     ),
                    );
                    }
                      }

Guys help me! :(

Customer requested this change for Thursday, I don't know how to do it :(

Thiago Correa
  • 164
  • 1
  • 1
  • 8
  • You can check this solutions of my:- https://stackoverflow.com/a/58029364/3946958 and https://stackoverflow.com/a/61315342/3946958 and let me know in case of concern – Ravindra Kushwaha May 04 '20 at 13:50

1 Answers1

0

I think you should checkout this package. And add the three texts like

slides.add(
  new Slide(
    title: "'Texto 1'",
  ),
);

Look through the documentation on how to specify the duration they slide.

Abdulaziz Yesuf
  • 582
  • 1
  • 6
  • 15