LinkProvider class

Knows how to open up a link to an application, with optional parameters. For a list of examples, see lib/default_providers.dart, eg gmailProvider

Implemented types

Constructors

LinkProvider(ProviderKey<Subject, LinkLaunchResponse> providerKey, {OperationKey<Subject, LinkLaunchResponse>? operationKey, Set<String>? tags, String? scheme, LinkFromHandle<Subject>? appLinkGenerator, LinkFromHandle<Subject>? webLinkGenerator, ExtractHandleFromUri? handleExtractor, String? typeLabel})
LinkProvider.basic(String key, {String? label, String? urlPath, String? appScheme, String tag = Tags.socialMedia, Set<String>? tags, LinkFromHandle<Subject>? appLinkGenerator, LinkFromHandle<Subject>? webLinkGenerator, bool generateAppLink = true})

Properties

appLinkGenerator → LinkFromHandle<Subject>?
A callback function to generate a direct app link. This generator is provided with the handle and arguments, if any
final
handleExtractor → ExtractHandleFromUri?
Allows this link provider to extract a handle from a Uri. This is also used to locate a link provider for any given uri. If this function returns null, then this link provider is not able to handle links of this type
final
hashCode → int
The hash code for this object.
no setterinherited
operationKey → OperationKey<Subject, LinkLaunchResponse>
This represents the underlying operation. In some cases, it's the same as the provider, but it could also represent something abstract, like sending email, or opening up a certain type of link
final
provider → String
no setter
providerKey → ProviderKey<Subject, LinkLaunchResponse>
A key representing the provider itself.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
scheme → String?
The scheme this app uses - this scheme is typically used to query the underlying os to see if there's an app that handles the link
final
tags → Set<String>
Tags allow us to assign an arbitrary meaning to each launch provider. For example, if it's a social media profile
final
typeLabel → String?
A readable label for this provider
final
webLinkGenerator → LinkFromHandle<Subject>?
A callback function to generate a direct web link. This generator is provided with the handle and arguments, if any
final

Methods

error(Object e) → LinkLaunchResponse
Creates the appropriate error object
override
launch([Subject? input]) → Future<LinkLaunchResponse>
Launches this app, and returns the appropriate launch response
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited