@@ -127,7 +127,7 @@ class User extends UserInfo<auth_interop.UserJsImpl> {
127
127
Future <String > getIdToken ([bool forceRefresh = false ]) => jsObject
128
128
.getIdToken (forceRefresh.toJS)
129
129
.toDart
130
- .then ((value) => value! as String );
130
+ .then ((value) => ( value! as JSString ).toDart );
131
131
132
132
/// Links the user account with the given credentials, and returns any
133
133
/// available additional user information, such as user name.
@@ -526,7 +526,7 @@ class Auth extends JsObjectWrapper<auth_interop.AuthJsImpl> {
526
526
Future <List <String >> fetchSignInMethodsForEmail (String email) => auth_interop
527
527
.fetchSignInMethodsForEmail (jsObject, email.toJS)
528
528
.toDart
529
- .then ((value) => List <String >.from (value! as List < dynamic > ));
529
+ .then ((value) => List <String >.from (( value! as JSArray ).toDart ));
530
530
531
531
/// Checks if an incoming link is a sign-in with email link.
532
532
bool isSignInWithEmailLink (String emailLink) =>
@@ -753,7 +753,7 @@ class Auth extends JsObjectWrapper<auth_interop.AuthJsImpl> {
753
753
Future <String > verifyPasswordResetCode (String code) => auth_interop
754
754
.verifyPasswordResetCode (jsObject, code.toJS)
755
755
.toDart
756
- .then ((value) => value! as String );
756
+ .then ((value) => ( value! as JSString ).toDart );
757
757
}
758
758
759
759
/// Represents an auth provider.
@@ -1054,7 +1054,7 @@ class PhoneAuthProvider
1054
1054
jsObject
1055
1055
.verifyPhoneNumber (phoneOptions, applicationVerifier.jsObject)
1056
1056
.toDart
1057
- .then ((value) => value! as String );
1057
+ .then ((value) => ( value! as JSString ).toDart );
1058
1058
1059
1059
/// Creates a phone auth credential given the verification ID
1060
1060
/// from [verifyPhoneNumber] and the [verificationCode] that was sent to the
@@ -1081,7 +1081,7 @@ abstract class ApplicationVerifier<
1081
1081
/// Returns a Future containing string for a token that can be used to
1082
1082
/// assert the validity of a request.
1083
1083
Future <String > verify () =>
1084
- jsObject.verify ().toDart.then ((value) => value! as String );
1084
+ jsObject.verify ().toDart.then ((value) => ( value! as JSString ).toDart );
1085
1085
}
1086
1086
1087
1087
/// reCAPTCHA verifier.
@@ -1137,8 +1137,8 @@ class RecaptchaVerifier
1137
1137
1138
1138
/// Renders the reCAPTCHA widget on the page.
1139
1139
/// Returns a Future that resolves with the reCAPTCHA widget ID.
1140
- Future <num > render () =>
1141
- jsObject.render ().toDart.then ((value) => value! as num );
1140
+ Future <int > render () =>
1141
+ jsObject.render ().toDart.then ((value) => ( value! as JSNumber ).toDartInt );
1142
1142
}
1143
1143
1144
1144
/// A result from a phone number sign-in, link, or reauthenticate call.
0 commit comments