title: Is there a way in flutter to wait for fingerprint input
body: <p>What I want to do is have a lock screen that is always listening for a fingerprint and which then switches page, and I am not sure how to implement this. I have tried around and found it it is easy to just have a button and then call a function with that button that checks for fingerprints.</p>
  
  <p>My question basically is if I can constantly wait for the fingerprint sensor to be activated, and then automatically switches pages without anything else being done.</p>
  
  <p>Edit: If possible, it would be great if I would not need a popup. Now, i call the fingerprint with</p>
  
  <pre class="lang-dart prettyprint-override"><code>try {
    didAuthenticate = await _localAuthentication.authenticateWithBiometrics(
        localizedReason: 'Please authenticate to show account balance',
        useErrorDialogs: false);
  } catch (e) {
    print(e);
  }
  if (!mounted) return;
  if (didAuthenticate = true) {
    Navigator.pushReplacement(
      context,
      MaterialPageRoute(builder: (context) =&gt; MenuAppPage()),
    );
  }
  </code></pre>
  
  <p>On <a href="https://pub.dev/packages/local_auth" rel="nofollow noreferrer">https://pub.dev/packages/local_auth</a> I didn't find another way to do this, so if anyone has any hints, that'd be great</p>