Flutter Engine
flutter::AssetResolver Class Referenceabstract

#include <asset_resolver.h>

Inheritance diagram for flutter::AssetResolver:
flutter::APKAssetProvider flutter::AssetManager flutter::DirectoryAssetBundle

Public Member Functions

 AssetResolver ()=default
 
virtual ~AssetResolver ()=default
 
virtual bool IsValid () const =0
 
virtual bool IsValidAfterAssetManagerChange () const =0
 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 occurance of tool failures due to repeated network flakes caused by damaged cables or hereto unknown bugs in the Dart HTTP server implementation. More...
 
virtual std::unique_ptr< fml::MappingGetAsMapping (const std::string &asset_name) const =0
 

Detailed Description

Definition at line 16 of file asset_resolver.h.

Constructor & Destructor Documentation

◆ AssetResolver()

flutter::AssetResolver::AssetResolver ( )
default

◆ ~AssetResolver()

virtual flutter::AssetResolver::~AssetResolver ( )
virtualdefault

Member Function Documentation

◆ GetAsMapping()

virtual std::unique_ptr<fml::Mapping> flutter::AssetResolver::GetAsMapping ( const std::string &  asset_name) const
pure virtual

Implemented in flutter::AssetManager.

◆ IsValid()

virtual bool flutter::AssetResolver::IsValid ( ) const
pure virtual

Implemented in flutter::AssetManager.

◆ IsValidAfterAssetManagerChange()

virtual bool flutter::AssetResolver::IsValidAfterAssetManagerChange ( ) const
pure virtual

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 occurance of tool failures due to repeated network flakes caused by damaged cables or hereto unknown bugs in the Dart HTTP server implementation.

Returns
Returns whether this resolver is valid after the asset manager or run configuration is updated.

Implemented in flutter::AssetManager.


The documentation for this class was generated from the following file: