title: Hot Restart flutter app by one click of button
body: <p>I have developed a game. now When I click of a Elevated button.. I want my game to Restart. How  can I can do it in Flutter??</p>
  <pre><code>import 'dart:math';
  import 'package:flutter/material.dart';
  void main() {
    runApp(const GameUI());
  }
  
  class GameUI extends StatefulWidget {
    const GameUI({Key? key}) : super(key: key);
    @override
    _GameUIState createState() =&gt; _GameUIState();
  }
  
  class _GameUIState extends State&lt;GameUI&gt; {
  @override
   Widget build(BuildContext context) {
      return MaterialApp(
        home: Scaffold(
          appBar: AppBar(
            title: const Center(child: Text('Block Memory Game')),
          ),
          body: Stack(children: [
  
  /*   Here is the whole game code 
   Here whole game is in the stack  And this last Align contains restart button */
  
            Align(
              alignment: Alignment.bottomCenter,
              child: ElevatedButton(
                onPressed: (){
                  //what code to write here to restart the application
                },
                  child:
                  const Text('Restart Game')
              ),
            )
          ]),
        ),
      );
    }
  </code></pre>
  <p>When we press hotRestart button the application starts the same thing I want it to happen when i click on <code>Restart Game</code> button</p>