dvHomeWidgetLaunchScheme top-level constant

String const dvHomeWidgetLaunchScheme

The URL scheme a home widget's tap opens the application with.

One value, because three things have to agree on it and only one of them is Dart: the generated Java that fires the intent, the generated Swift that hands the URL to WidgetKit, and the desktop launch path that decides whether an argument is a link at all.

It is the framework's scheme rather than the application's, and that is worth stating rather than leaving as an oversight. On Android the intent names the Activity outright, so nothing resolves the scheme and a shared one costs nothing. On Apple the URL is handed to the containing application by WidgetKit rather than through LaunchServices, so it costs nothing there either. Where it would cost something is an application that also wants dartvel:// links from outside itself, and giving it a scheme of its own is a change that cannot be checked without a device.

Implementation

const String dvHomeWidgetLaunchScheme = 'dartvel';