-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.
Description
The platform interfaces for federated plugins include some logic other than the interface definition (see flutter/plugins#2230).
We would like to move the common code to a reusable place such that a federated plugin platform interface looks like:
class UrlLauncherPlatform with PluginPlatformInterfaceMixin {
// The only thing we have here is the interface definition in the form of throwing methods, e.g:
Future<bool> canLaunch(String url) {
throw UnimplementedError('canLaunch() has not been implemented.');
}
}Note that this means removing the static instance from the platform interface, and instead keeping some central map of platform implementations.
Platform implementation activation will look something like:
// We may be able to do more useful things than having a public static instance, but
// this is out of scope for current discussion.
PluginImplementations pluginImplementations = PluginImplementations.instance;
pluginImplementations.set(UrlLauncherPlatform, WindowsUrlLauncherPlatform());fzyzcjy
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.