Flutter Engine
fl_dart_project_private.h File Reference
#include <glib-object.h>
#include "flutter/shell/platform/linux/public/flutter_linux/fl_dart_project.h"

Go to the source code of this file.

Functions

G_BEGIN_DECLS GPtrArray * fl_dart_project_get_switches (FlDartProject *project)
 

Function Documentation

◆ fl_dart_project_get_switches()

G_BEGIN_DECLS GPtrArray* fl_dart_project_get_switches ( FlDartProject *  project)

fl_dart_project_get_switches: : an #FlDartProject.

Determines the engine switches that should be passed to the Flutter engine.

Returns: an array of switches to pass to the Flutter engine.

Definition at line 117 of file fl_dart_project.cc.

References flutter::GetSwitchesFromEnvironment().

Referenced by fl_engine_start(), and TEST().

117  {
118  GPtrArray* switches = g_ptr_array_new_with_free_func(g_free);
119  std::vector<std::string> env_switches = flutter::GetSwitchesFromEnvironment();
120  for (const auto& env_switch : env_switches) {
121  g_ptr_array_add(switches, g_strdup(env_switch.c_str()));
122  }
123  if (self->enable_mirrors) {
124  g_ptr_array_add(switches, g_strdup("--dart-flags=--enable_mirrors=true"));
125  }
126  return switches;
127 }
std::vector< std::string > GetSwitchesFromEnvironment()