5#ifndef FLUTTER_SHELL_COMMON_RUN_CONFIGURATION_H_
6#define FLUTTER_SHELL_COMMON_RUN_CONFIGURATION_H_
73 std::unique_ptr<IsolateConfiguration> configuration);
84 std::shared_ptr<AssetManager> asset_manager);
200 void SetEngineId(std::optional<int64_t> engine_id);
207 std::unique_ptr<IsolateConfiguration> isolate_configuration_;
208 std::shared_ptr<AssetManager> asset_manager_;
209 std::string entrypoint_ =
"main";
210 std::string entrypoint_library_ =
"";
211 std::vector<std::string> entrypoint_args_;
212 std::optional<int64_t> engine_id_;
Specifies all the configuration required by the runtime library to launch the root isolate....
std::unique_ptr< IsolateConfiguration > TakeIsolateConfiguration()
The engine uses this to take the isolate configuration from the run configuration....
std::shared_ptr< AssetManager > GetAssetManager() const
const std::string & GetEntrypoint() const
void SetEntrypointArgs(std::vector< std::string > entrypoint_args)
Updates the main application entrypoint arguments.
const std::vector< std::string > & GetEntrypointArgs() const
std::optional< int64_t > GetEngineId() const
void SetEntrypointAndLibrary(std::string entrypoint, std::string library)
Specifies the main Dart entrypoint and the library to find that entrypoint in. By default,...
bool AddAssetResolver(std::unique_ptr< AssetResolver > resolver)
Asset managers maintain a list of resolvers that are checked in order when attempting to locate an as...
bool IsValid() const
A valid run configuration only guarantees that the engine should be able to find the assets and the i...
void SetEntrypoint(std::string entrypoint)
Updates the main application entrypoint. If this is not set, the "main" method is used as the entrypo...
RunConfiguration(RunConfiguration &&config)
Run configurations cannot be copied because it may not always be possible to copy the underlying isol...
void SetEngineId(std::optional< int64_t > engine_id)
Sets the engine identifier to be passed to the platform dispatcher.
~RunConfiguration()
There are no threading restrictions on the destruction of the run configuration.
const std::string & GetEntrypointLibrary() const
static RunConfiguration InferFromSettings(const Settings &settings, const fml::RefPtr< fml::TaskRunner > &io_worker=nullptr, IsolateLaunchType launch_type=IsolateLaunchType::kNewGroup)
Attempts to infer a run configuration from the settings object. This tries to create a run configurat...
#define FML_DISALLOW_COPY_AND_ASSIGN(TypeName)
@ kNewGroup
The isolate is launched as a solo isolate or to start a new group.