validateRelationship method

  1. @SupportedPlatforms.new(platforms: [AndroidPlatform(apiName: 'CustomTabsSession.validateRelationship', apiUrl: 'https://developer.android.com/reference/androidx/browser/customtabs/CustomTabsSession#validateRelationship(int,android.net.Uri,android.os.Bundle)')])
Future<bool> validateRelationship({
  1. required CustomTabsRelationType relation,
  2. required WebUri origin,
})

Requests to validate a relationship between the application and an origin.

See here for documentation about Digital Asset Links. This methods requests the browser to verify a relation with the calling application, to grant the associated rights.

If this method returns true, the validation result will be provided through PlatformChromeSafariBrowserEvents.onRelationshipValidationResult. Otherwise the request didn't succeed.

relation – Relation to check, must be one of the CustomTabsRelationType constants.

origin – Origin.

extras – Reserved for future use.

Officially Supported Platforms/Implementations:

Parameters - Officially Supported Platforms/Implementations:

  • relation: all platforms
  • origin: all platforms

Use the PlatformChromeSafariBrowser.isMethodSupported method to check if this method is supported at runtime.

Implementation

@SupportedPlatforms(
  platforms: [
    AndroidPlatform(
      apiName: 'CustomTabsSession.validateRelationship',
      apiUrl:
          'https://developer.android.com/reference/androidx/browser/customtabs/CustomTabsSession#validateRelationship(int,android.net.Uri,android.os.Bundle)',
    ),
  ],
)
Future<bool> validateRelationship({
  required CustomTabsRelationType relation,
  required WebUri origin,
}) {
  throw UnimplementedError(
    'validateRelationship is not implemented on the current platform',
  );
}