@@ -110,7 +110,7 @@ Future<void> _handleSignInResult(SignInResult result) async {
110
110
// #enddocregion handle-signin, handle-confirm-signin-sms, handle-confirm-signin-new-password, handle-confirm-signin-custom-challenge, handle-confirm-signin-reset-password, handle-confirm-signin-confirm-signup, handle-confirm-signin-done, handle-confirm-signin-mfa-selection, handle-confirm-signin-totp-setup, handle-confirm-signin-totp-code, handle-confirm-signin-email-code, handle-confirm-signin-mfa-setup-selection, handle-confirm-signin-email-setup
111
111
// #docregion handle-confirm-signin-mfa-selection
112
112
case AuthSignInStep .continueSignInWithMfaSelection:
113
- final allowedMfaTypes = result.nextStep.allowedMfaTypes;
113
+ final allowedMfaTypes = result.nextStep.allowedMfaTypes! ;
114
114
final selection = await _promptUserPreference (allowedMfaTypes);
115
115
return _handleMfaSelection (selection);
116
116
// #enddocregion handle-confirm-signin-mfa-selection
@@ -126,7 +126,7 @@ Future<void> _handleSignInResult(SignInResult result) async {
126
126
// #enddocregion handle-confirm-signin-mfa-setup-selection
127
127
// #docregion handle-confirm-signin-totp-setup
128
128
case AuthSignInStep .continueSignInWithTotpSetup:
129
- final totpSetupDetails = result.nextStep.totpSetupDetails;
129
+ final totpSetupDetails = result.nextStep.totpSetupDetails! ;
130
130
final setupUri = totpSetupDetails.getSetupUri (appName: 'MyApp' );
131
131
safePrint ('Open URI to complete setup: $setupUri ' );
132
132
// #enddocregion handle-confirm-signin-totp-setup
@@ -276,7 +276,7 @@ Future<void> signOutGlobally() async {
276
276
if (result is CognitoCompleteSignOut ) {
277
277
safePrint ('Sign out completed successfully' );
278
278
} else if (result is CognitoPartialSignOut ) {
279
- final globalSignOutException = result.globalSignOutException;
279
+ final globalSignOutException = result.globalSignOutException! ;
280
280
final accessToken = globalSignOutException.accessToken;
281
281
// Retry the global sign out using the access token, if desired
282
282
// ...
0 commit comments