5#ifndef FLUTTER_SHELL_COMMON_RUN_CONFIGURATION_H_
6#define FLUTTER_SHELL_COMMON_RUN_CONFIGURATION_H_
11#include "flutter/assets/asset_manager.h"
12#include "flutter/assets/asset_resolver.h"
13#include "flutter/common/settings.h"
14#include "flutter/fml/macros.h"
15#include "flutter/fml/mapping.h"
16#include "flutter/fml/unique_fd.h"
17#include "flutter/runtime/isolate_configuration.h"
73 std::unique_ptr<IsolateConfiguration> configuration);
84 std::shared_ptr<AssetManager> asset_manager);
198 std::unique_ptr<IsolateConfiguration> isolate_configuration_;
199 std::shared_ptr<AssetManager> asset_manager_;
200 std::string entrypoint_ =
"main";
201 std::string entrypoint_library_ =
"";
202 std::vector<std::string> entrypoint_args_;
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
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...
RunConfiguration(std::unique_ptr< IsolateConfiguration > configuration)
Creates a run configuration with only an isolate configuration. There is no asset manager and default...
~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...
@ kNewGroup
The isolate is launched as a solo isolate or to start a new group.