5#ifndef FLUTTER_ASSETS_ASSET_MANAGER_H_
6#define FLUTTER_ASSETS_ASSET_MANAGER_H_
13#include "flutter/assets/asset_resolver.h"
14#include "flutter/fml/macros.h"
15#include "flutter/fml/memory/ref_counted.h"
32 bool PushFront(std::unique_ptr<AssetResolver> resolver);
41 bool PushBack(std::unique_ptr<AssetResolver> resolver);
68 std::unique_ptr<AssetResolver> updated_asset_resolver,
84 const std::string& asset_name)
const override;
88 const std::string& asset_pattern,
89 const std::optional<std::string>& subdir)
const override;
98 std::deque<std::unique_ptr<AssetResolver>> resolvers_;
void UpdateResolverByType(std::unique_ptr< AssetResolver > updated_asset_resolver, AssetResolver::AssetResolverType type)
Replaces an asset resolver of the specified type with updated_asset_resolver. The matching AssetResol...
std::vector< std::unique_ptr< fml::Mapping > > GetAsMappings(const std::string &asset_pattern, const std::optional< std::string > &subdir) const override
Same as GetAsMapping() but returns mappings for all files who's name matches a given pattern....
std::unique_ptr< fml::Mapping > GetAsMapping(const std::string &asset_name) const override
std::deque< std::unique_ptr< AssetResolver > > TakeResolvers()
bool IsValid() const override
const AssetManager * as_asset_manager() const override
bool operator==(const AssetResolver &other) const override
bool PushBack(std::unique_ptr< AssetResolver > resolver)
Adds an asset resolver to the end of the resolver queue. Assets would be loaded from this resolver af...
bool PushFront(std::unique_ptr< AssetResolver > resolver)
Adds an asset resolver to the front of the resolver queue. Assets would be loaded from this resolver ...
AssetResolver::AssetResolverType GetType() const override
Gets the type of AssetResolver this is. Types are defined in AssetResolverType.
bool IsValidAfterAssetManagerChange() const override
Certain asset resolvers are still valid after the asset manager is replaced before a hot reload,...
AssetResolverType
Identifies the type of AssetResolver an instance is.