cancel method
- @SupportedPlatforms.new(platforms: [IOSPlatform(apiName: 'ASWebAuthenticationSession.cancel', apiUrl: 'https://developer.apple.com/documentation/authenticationservices/aswebauthenticationsession/2990951-cancel'), MacOSPlatform(apiName: 'ASWebAuthenticationSession.cancel', apiUrl: 'https://developer.apple.com/documentation/authenticationservices/aswebauthenticationsession/2990951-cancel')])
Cancels the web authentication session.
If the session has already presented a view with the authentication webpage, calling this method dismisses that view. Calling cancel on an already canceled session has no effect.
Officially Supported Platforms/Implementations:
- iOS WKWebView (Official API - ASWebAuthenticationSession.cancel)
- macOS WKWebView (Official API - ASWebAuthenticationSession.cancel)
Use the PlatformWebAuthenticationSession.isMethodSupported method to check if this method is supported at runtime.
Implementation
@SupportedPlatforms(
platforms: [
IOSPlatform(
apiName: 'ASWebAuthenticationSession.cancel',
apiUrl:
'https://developer.apple.com/documentation/authenticationservices/aswebauthenticationsession/2990951-cancel',
),
MacOSPlatform(
apiName: 'ASWebAuthenticationSession.cancel',
apiUrl:
'https://developer.apple.com/documentation/authenticationservices/aswebauthenticationsession/2990951-cancel',
),
],
)
Future<void> cancel() {
throw UnimplementedError(
'cancel is not implemented on the current platform',
);
}