logout static method

dynamic logout(
  1. BuildContext context, {
  2. Function? onLogout,
})

Initiates a logout and the authManager redirects to the loginFragment

context is necessary

onLogout is a callback function that is called immediately after a logout

Implementation

static logout(BuildContext context, {Function? onLogout}) {
  Provider.of<FireAuthProvider>(context, listen: false).logout(
    onLogout: onLogout,
  );
}