Unverified Commit a76bb1a0 authored by Gary Qian's avatar Gary Qian Committed by GitHub

Add DynamicFeature system channel (#71879)

parent d075b979
......@@ -318,4 +318,30 @@ class SystemChannels {
'flutter/restoration',
StandardMethodCodec(),
);
/// A [MethodChannel] for installing and managing dynamic features.
///
/// The following outgoing methods are defined for this channel (invoked using
/// [OptionalMethodChannel.invokeMethod]):
///
/// * `installDynamicFeature`: Requests that a dynamic feature identified by
/// the provided loadingUnitId or moduleName be downloaded and installed.
/// Providing a loadingUnitId with null moduleName will install a dynamic
/// feature module that includes the desired loading unit. If a moduleName
/// is provided, then the dynamic feature with the moduleName will be installed.
/// This method returns a future that will not be completed until the
/// feature is fully installed and ready to use. When an error occurs, the
/// future will complete an error. Calling `loadLibrary()` on a deferred
/// imported library is equivalent to calling this method with a
/// loadingUnitId and null moduleName.
/// * `getDynamicFeatureInstallState`: Gets the current installation state of
/// the dynamic feature identified by the loadingUnitId or moduleName.
/// This method returns a string that represents the state. Depending on
/// the implementation, this string may vary, but the default Google Play
/// Store implementation beings in the "Requested" state before transitioning
/// into the "Downloading" and finally the "Installed" state.
static const MethodChannel dynamicfeature = OptionalMethodChannel(
'flutter/dynamicfeature',
StandardMethodCodec(),
);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment