signIn static method

Future<GithubSignInResponse> signIn(
  1. BuildContext context, {
  2. required GithubParamsModel params,
  3. PreferredSize? appBar,
})

Implementation

static Future<GithubSignInResponse> signIn(BuildContext context,
    {required GithubParamsModel params, PreferredSize? appBar}) async {
  dynamic result = await Navigator.push(
    context,
    MaterialPageRoute(
      builder: (context) => GithubSignIn(
        params: params,
        appBar: appBar,
      ),
    ),
  );
  if (result == null) {
    return GithubSignInResponse(
      status: ResultStatus.error,
      message: "User cancelled the sign in or error occurred",
    );
  } else {
    return result as GithubSignInResponse;
  }
}