title: Invalid argument(s) (onError): The error handler of Future.catchError must return a value of the future's type
body: <p>I am trying to write a dart code program which can register users and sign in users, upon error print its description which i will eventually use in a Toast but it given an error on catchError</p>
  <pre><code>Future&lt;void&gt; signIn(String email, String password) async {
      if (_form.currentState!.validate()) {
        print(email);
        await _auth
            .signInWithEmailAndPassword(email: email, password: password)
            .then((uid) =&gt; {
          Fluttertoast.showToast(msg: &quot;Login Successfully&quot;),
          Navigator.of(context)
              .pushReplacementNamed(UploadScreen.routeName),
        })
            .catchError((e) {
          Fluttertoast.showToast(msg: 'Incorrect Email or Password.',
              toastLength: Toast.LENGTH_LONG
          );
        });
      }
    }
  </code></pre>
  <p>E/flutter ( 7093): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: Invalid argument(s) (onError): The error handler of Future.catchError must return a value of the future's type
  E/flutter ( 7093): #0      _FutureListener.handleError (dart:async/future_impl.dart:193:7)
  E/flutter ( 7093): #1      Future._propagateToListeners.handleError (dart:async/future_impl.dart:778:47)
  E/flutter ( 7093): #2      Future._propagateToListeners (dart:async/future_impl.dart:799:13)
  E/flutter ( 7093): #3      Future._completeError (dart:async/future_impl.dart:609:5)
  E/flutter ( 7093): #4      _completeOnAsyncError (dart:async-patch/async_patch.dart:272:13)
  E/flutter ( 7093): #5      FirebaseAuth.signInWithEmailAndPassword (package:firebase_auth/src/firebase_auth.dart)
  E/flutter ( 7093): 
  E/flutter ( 7093):</p>