Flutter Engine Uber Docs
Docs for the entire Flutter Engine repo.
 
Loading...
Searching...
No Matches
flutter::DartProject Class Reference

#include <dart_project.h>

Public Member Functions

 DartProject (const std::wstring &assets_path, const std::wstring &icu_data_path, const std::wstring &aot_library_path)
 
 DartProject (const std::wstring &path)
 
 ~DartProject ()=default
 
void set_dart_entrypoint (const std::string &entrypoint)
 
const std::string & dart_entrypoint () const
 
void set_dart_entrypoint_arguments (std::vector< std::string > arguments)
 
const std::vector< std::string > & dart_entrypoint_arguments () const
 
void set_gpu_preference (GpuPreference gpu_preference)
 
GpuPreference gpu_preference () const
 
void set_ui_thread_policy (UIThreadPolicy policy)
 
UIThreadPolicy ui_thread_policy () const
 

Friends

class FlutterEngine
 
class FlutterViewController
 
class DartProjectTest
 

Detailed Description

Definition at line 39 of file dart_project.h.

Constructor & Destructor Documentation

◆ DartProject() [1/2]

flutter::DartProject::DartProject ( const std::wstring &  assets_path,
const std::wstring &  icu_data_path,
const std::wstring &  aot_library_path 
)
inlineexplicit

Definition at line 49 of file dart_project.h.

51 {
52 assets_path_ = assets_path;
53 icu_data_path_ = icu_data_path;
54 aot_library_path_ = aot_library_path;
55 }

◆ DartProject() [2/2]

flutter::DartProject::DartProject ( const std::wstring &  path)
inlineexplicit

Definition at line 65 of file dart_project.h.

65 {
66 assets_path_ = path + L"\\flutter_assets";
67 icu_data_path_ = path + L"\\icudtl.dat";
68 aot_library_path_ = path + L"\\app.so";
69 }
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
Definition switch_defs.h:52

References flutter::path.

◆ ~DartProject()

flutter::DartProject::~DartProject ( )
default

Member Function Documentation

◆ dart_entrypoint()

const std::string & flutter::DartProject::dart_entrypoint ( ) const
inline

Definition at line 85 of file dart_project.h.

85{ return dart_entrypoint_; }

Referenced by flutter::FlutterEngine::FlutterEngine().

◆ dart_entrypoint_arguments()

const std::vector< std::string > & flutter::DartProject::dart_entrypoint_arguments ( ) const
inline

Definition at line 95 of file dart_project.h.

95 {
96 return dart_entrypoint_arguments_;
97 }

Referenced by flutter::FlutterEngine::FlutterEngine(), and flutter::TEST_F().

◆ gpu_preference()

GpuPreference flutter::DartProject::gpu_preference ( ) const
inline

Definition at line 106 of file dart_project.h.

106{ return gpu_preference_; }

Referenced by flutter::FlutterEngine::FlutterEngine(), and set_gpu_preference().

◆ set_dart_entrypoint()

void flutter::DartProject::set_dart_entrypoint ( const std::string &  entrypoint)
inline

Definition at line 77 of file dart_project.h.

77 {
78 if (entrypoint.empty()) {
79 return;
80 }
81 dart_entrypoint_ = entrypoint;
82 }

Referenced by flutter::TEST().

◆ set_dart_entrypoint_arguments()

void flutter::DartProject::set_dart_entrypoint_arguments ( std::vector< std::string >  arguments)
inline

Definition at line 89 of file dart_project.h.

89 {
90 dart_entrypoint_arguments_ = std::move(arguments);
91 }

Referenced by flutter::TEST(), and flutter::TEST_F().

◆ set_gpu_preference()

void flutter::DartProject::set_gpu_preference ( GpuPreference  gpu_preference)
inline

Definition at line 100 of file dart_project.h.

100 {
101 gpu_preference_ = gpu_preference;
102 }
GpuPreference gpu_preference() const

References gpu_preference().

◆ set_ui_thread_policy()

void flutter::DartProject::set_ui_thread_policy ( UIThreadPolicy  policy)
inline

Definition at line 109 of file dart_project.h.

109 {
110 ui_thread_policy_ = policy;
111 }
it will be possible to load the file into Perfetto s trace viewer use test Running tests that layout and measure text will not yield consistent results across various platforms Enabling this option will make font resolution default to the Ahem test font on all disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network policy

References flutter::policy.

◆ ui_thread_policy()

UIThreadPolicy flutter::DartProject::ui_thread_policy ( ) const
inline

Definition at line 115 of file dart_project.h.

115{ return ui_thread_policy_; }

Referenced by flutter::FlutterEngine::FlutterEngine().

Friends And Related Symbol Documentation

◆ DartProjectTest

friend class DartProjectTest
friend

Definition at line 124 of file dart_project.h.

◆ FlutterEngine

friend class FlutterEngine
friend

Definition at line 122 of file dart_project.h.

◆ FlutterViewController

friend class FlutterViewController
friend

Definition at line 123 of file dart_project.h.


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