5#ifndef FLUTTER_ASSETS_ASSET_RESOLVER_H_
6#define FLUTTER_ASSETS_ASSET_RESOLVER_H_
12#include "flutter/fml/macros.h"
13#include "flutter/fml/mapping.h"
18class APKAssetProvider;
19class DirectoryAssetBundle;
73 const std::string& asset_name)
const = 0;
90 [[nodiscard]]
virtual std::vector<std::unique_ptr<fml::Mapping>>
92 const std::optional<std::string>& subdir)
const {
virtual const AssetManager * as_asset_manager() const
virtual bool operator==(const AssetResolver &other) const =0
virtual AssetResolverType GetType() const =0
Gets the type of AssetResolver this is. Types are defined in AssetResolverType.
virtual std::unique_ptr< fml::Mapping > GetAsMapping(const std::string &asset_name) const =0
virtual bool IsValid() const =0
bool operator!=(const AssetResolver &other) const
AssetResolverType
Identifies the type of AssetResolver an instance is.
virtual bool IsValidAfterAssetManagerChange() const =0
Certain asset resolvers are still valid after the asset manager is replaced before a hot reload,...
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....
virtual const DirectoryAssetBundle * as_directory_asset_bundle() const
virtual const APKAssetProvider * as_apk_asset_provider() const
virtual ~AssetResolver()=default