title: How to remove widget from initstate or load widget widget in initstate only once?
body: <p>Apologies if my question is a bit dumb but I have just started with flutter.</p>
  
  <p>I am working on sharing and deep link flutter. I have created intent and everything is working perfect except one. I am calling "initUniLinks" on my homepage not mainpage.
  So link and navigation is working perfect but when I open app through link shared and specific page opens but after that when go to homepage it again gets the "initUniLinks" and again redirects to specified page.</p>
  
  <p>I am using Uni-link plugin and app or deep link method from this 
  <a href="https://pub.dev/packages/uni_links" rel="nofollow noreferrer">https://pub.dev/packages/uni_links</a></p>
  
  <p>I have tried not too much but some basic options like giving null value to initialLink before navigation but as my widget is in initstate it is called again when I come back to homepage.</p>
  
  <pre><code>class HomePage extends StatefulWidget {
    final Widget child;
    HomePage({Key key, this.child}) : super(key: key);
    _HomePageState createState() =&gt; _HomePageState();
  }
  
  class _HomePageState extends State&lt;HomePage&gt; with WidgetsBindingObserver {
  
    String initialLink = "";
  
    void initState() {
      super.initState();
      initUniLinks();
    }
  
    Future&lt;Null&gt; initUniLinks() async {
      try {
        initialLink = await getInitialLink();
  
        if (initialLink != null || initialLink != "") {
          initialLink.contains("pgpost")
              ? await Navigator.push(
                  context, MaterialPageRoute(builder: (context) =&gt; PostPage()))
              : await Navigator.push(context,
                      MaterialPageRoute(builder: (context) =&gt; UserPage()));
  
        }
      } on PlatformException {
  
      }
    }
  }
  </code></pre>
  
  <p>I just want to know is there any way that I can call 'initUniLinks" just one time not every time by removing from initstate ?
  Or any other better solution.
  Scenario here is simple I want my user to navigate to deep link page only one time when he clicks the link but after that my app should be able to navigate normally.</p>