Skip to content

Commit

Permalink
record error in verify phone number (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
cp-sidhdhi-p authored Jun 6, 2024
1 parent 66854e8 commit a33ce02
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'package:canopas_country_picker/canopas_country_picker.dart';
import 'package:data/service/auth/auth_service.dart';
import 'package:data/service/device/device_service.dart';
import 'package:firebase_crashlytics/firebase_crashlytics.dart';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:freezed_annotation/freezed_annotation.dart';
Expand Down Expand Up @@ -67,6 +68,9 @@ class SignInWithPhoneViewNotifier extends StateNotifier<SignInWithPhoneState> {
state = state.copyWith(verifying: false, signInSuccess: true);
},
onVerificationFailed: (error) {
FirebaseCrashlytics.instance.recordError(error, error.stackTrace,
reason: "Verify Phone-Number Error",
information: [error.statusCode ?? "", error.message ?? ""]);
state = state.copyWith(verifying: false, actionError: error);
debugPrint(
"SignInWithPhoneViewNotifier: error in verifyPhoneNumber -> $error");
Expand Down

0 comments on commit a33ce02

Please sign in to comment.