title: How can i stop my app from getting back to splash screen
body: <p>I'm building a simple ordering app with a splash screen , and i'm having trouble on making the app to not go back on the splash screen ,I have tried a conditional operator to solve the problem, but its not doing anything, is there any other alternatives to achieve that??</p>
  
  <pre><code>import "package:flutter/material.dart";
  import 'package:propapp/tabs/main.dart';
  import 'dart:async';
  
  bool loaded = false;
  
  void main() =&gt; runApp(new MaterialApp(
      theme: ThemeData(
        primaryColor: Colors.amber,
        accentColor: Colors.amberAccent,
      ),
      debugShowCheckedModeBanner: false,
      home: loaded == true ? Menu() : SplashScreen()));
  
  class SplashScreen extends StatefulWidget {
    @override
    _SplashScreenState createState() =&gt; new _SplashScreenState();
  }
  
  class _SplashScreenState extends State&lt;SplashScreen&gt; {
    @override
    void initState() {
      super.initState();
  
      new Future.delayed(
          const Duration(seconds: 3),
          () =&gt; Navigator.push(
                context,
                MaterialPageRoute(builder: (context) =&gt; Menu()),
              ));
      loaded = true;
        }
  
  
  }
  </code></pre>