validateRelationship method
Future<bool>
validateRelationship({
- required CustomTabsRelationType relation,
- 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:
Implementation
@override
Future<bool> validateRelationship(
{required CustomTabsRelationType relation,
required WebUri origin}) async {
Map<String, dynamic> args = <String, dynamic>{};
args.putIfAbsent('relation', () => relation.toNativeValue());
args.putIfAbsent('origin', () => origin.toString());
return await channel?.invokeMethod<bool>("validateRelationship", args) ??
false;
}