title: Flutter : want to excecute code in try-catch but async
body: <p>hi everyone I want to execute some codes inside try-catch.
  if all conditions in try are met, then I want to change the screen.
  but because the conditions has await, the screen changes before the conditions are checked.</p>
  <p>So is there a way to solve this?
  Is there anyway to wait for others to end and then do Navigator.push?</p>
  <p>I tried Future.dowhile() but not working..</p>
  <pre><code>try {
          await savePhoneNum(_phoneNumberController.text);
  
          await postAppToken(
              tokenValue,
              _packageInfo.appName,
              _packageInfo.version,
              Theme.of(context).platform.toString().substring(15),
          _phoneNumberController.text);
  
          final PhoneAuthCredential credential = PhoneAuthProvider.credential(
          verificationId: _verificationId,
          smsCode: _smsController.text,
          );
  
          Navigator.push(
          context, MaterialPageRoute(builder: (context) =&gt; BottomBarScreen()));
          
      } catch (e) {
        
        ScaffoldMessenger.of(context).showSnackBar(SnackBar(content: Text('${e.toString()}')),
        );
      }
  </code></pre>