44
55package io .flutter .embedding .engine .dynamicfeatures ;
66
7+ // TODO: add links to external documentation on how to use split aot features.
78/**
89 * Basic interface that handles downloading and loading of dynamic features.
910 *
2223 * should typically ensure the new assets are available to the engine's asset manager by passing an
2324 * updated android AssetManager to the engine.
2425 *
25- * <p>The methods here may also be called manually via platform channel messages.
26+ * <p>The loadAssets and loadDartLibrary methods are separated out because they may also be called
27+ * manually via platform channel messages. A full downloadDynamicFeature implementation should call
28+ * these two methods as needed.
2629 *
2730 * <p>A dynamic feature module is uniquely identified by a module name as defined in bundle_config.yaml.
28- * Each feature module may contain one or more loading units, uniquely identified by the loading unit ID.
31+ * Each feature module may contain one or more loading units, uniquely identified by the loading unit ID
32+ * and assets.
2933 */
3034public interface DynamicFeatureManager {
3135 /**
@@ -37,9 +41,9 @@ public interface DynamicFeatureManager {
3741 *
3842 * <p>This method begins the download and installation of the specified feature module. For example,
3943 * the Play Store dynamic delivery implementation uses SplitInstallManager to request the download of
40- * the module. Download is not complete when this method returns. Upon completion of
41- * download, loadAssets and loadDartLibrary should be called to complete the dynamic feature load
42- * process.
44+ * the module. Download is not complete when this method returns. The download process should be
45+ * listened for and upon completion of download, listeners should invoke loadAssets and loadDartLibrary
46+ * to complete the dynamic feature load process.
4347 *
4448 * <p>Both parameters are not always necessary to identify which module to install. Asset-only modules
4549 * do not have an associated loadingUnitId. Instead, an invalid ID like -1 may be passed to download
0 commit comments