Public Member Functions | |
| ThreadCheckingAssetResolver (std::shared_ptr< fml::ConcurrentMessageLoop > concurrent_loop) | |
| bool | IsValid () const override |
| bool | IsValidAfterAssetManagerChange () const override |
| Certain asset resolvers are still valid after the asset manager is replaced before a hot reload, or after a new run configuration is created during a hot restart. By preserving these resolvers and re-inserting them into the new resolver or run configuration, the tooling can avoid needing to sync all application assets through the Dart devFS upon connecting to the VM Service. Besides improving the startup performance of running a Flutter application, it also reduces the occurrence of tool failures due to repeated network flakes caused by damaged cables or hereto unknown bugs in the Dart HTTP server implementation. | |
| AssetResolverType | GetType () const |
| Gets the type of AssetResolver this is. Types are defined in AssetResolverType. | |
| std::unique_ptr< fml::Mapping > | GetAsMapping (const std::string &asset_name) const override |
| bool | operator== (const AssetResolver &other) const override |
Public Member Functions inherited from flutter::AssetResolver | |
| AssetResolver ()=default | |
| virtual | ~AssetResolver ()=default |
| virtual const AssetManager * | as_asset_manager () const |
| virtual const APKAssetProvider * | as_apk_asset_provider () const |
| virtual const DirectoryAssetBundle * | as_directory_asset_bundle () const |
| virtual std::vector< std::unique_ptr< fml::Mapping > > | GetAsMappings (const std::string &asset_pattern, const std::optional< std::string > &subdir) const |
| Same as GetAsMapping() but returns mappings for all files who's name matches a given pattern. Returns empty vector if no matching assets are found. | |
| bool | operator!= (const AssetResolver &other) const |
Public Attributes | |
| std::vector< std::string > | mapping_requests |
Additional Inherited Members | |
Public Types inherited from flutter::AssetResolver | |
| enum | AssetResolverType { kAssetManager , kApkAssetProvider , kDirectoryAssetBundle } |
| Identifies the type of AssetResolver an instance is. More... | |
Definition at line 313 of file shell_unittests.cc.
|
inlineexplicit |
Definition at line 315 of file shell_unittests.cc.
|
inlineoverridevirtual |
Implements flutter::AssetResolver.
Definition at line 331 of file shell_unittests.cc.
References fml::BacktraceHere(), and mapping_requests.
|
inlinevirtual |
Gets the type of AssetResolver this is. Types are defined in AssetResolverType.
Implements flutter::AssetResolver.
Definition at line 326 of file shell_unittests.cc.
References flutter::AssetResolver::kApkAssetProvider.
|
inlineoverridevirtual |
Implements flutter::AssetResolver.
Definition at line 320 of file shell_unittests.cc.
|
inlineoverridevirtual |
Certain asset resolvers are still valid after the asset manager is replaced before a hot reload, or after a new run configuration is created during a hot restart. By preserving these resolvers and re-inserting them into the new resolver or run configuration, the tooling can avoid needing to sync all application assets through the Dart devFS upon connecting to the VM Service. Besides improving the startup performance of running a Flutter application, it also reduces the occurrence of tool failures due to repeated network flakes caused by damaged cables or hereto unknown bugs in the Dart HTTP server implementation.
Implements flutter::AssetResolver.
Definition at line 323 of file shell_unittests.cc.
|
inlineoverridevirtual |
Implements flutter::AssetResolver.
Definition at line 346 of file shell_unittests.cc.
|
mutable |
Definition at line 344 of file shell_unittests.cc.
Referenced by GetAsMapping().