Add DynamicFeature system channel (#71879)
This commit is contained in:
parent
d075b979f8
commit
a76bb1a08e
@ -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(),
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user