beginSigning method

Future<String> beginSigning()

Implementation

Future<String> beginSigning() async {
  assert(isNonNull(inSignIn));

  try {
    await sign(inSignIn, getAuth());
    return null;
  } catch (e) {
    if (isFirebaseEx(e)) {
      final fex = FirebaseExceptionData();
      fex.code = e.code;
      fex.message = e.message;
      print('HANDLED FIREBASE EXCEPTION $e  $fex');

      final response = baseerrMsg(e, true, fex);
      // Don't know how to handle exception
      if (isNonNull(response)) {
        // throw 'Unhandled Firebase Exception' + e;
        return response;
      } else {
        return fex.message;
      }
    } else {
      print('ENCOUNTERED EXCEPTION $e');

      final response = baseerrMsg(e, false, null);
      // Don't know how to handle exception
      if (isNull(response)) {
        throw 'Exception not handled $e';
      } else {
        return response;
      }
    }
  }
}