29 const std::string& assets_path,
30 const std::vector<std::string>& arguments,
31 const std::string& aot_library_path) {
32 if (!init_succeeded_) {
33 std::cerr <<
"Could not create window; FlutterDesktopInit failed."
39 std::cerr <<
"Only one Flutter window can exist at a time." << std::endl;
44 c_window_properties.
title = window_properties.
title.c_str();
45 c_window_properties.
width = window_properties.
width;
50 c_engine_properties.
assets_path = assets_path.c_str();
53 std::vector<const char*> engine_switches;
55 arguments.begin(), arguments.end(), std::back_inserter(engine_switches),
56 [](
const std::string& arg) ->
const char* { return arg.c_str(); });
57 if (!engine_switches.empty()) {
58 c_engine_properties.
switches = &engine_switches[0];
65 std::cerr <<
"Failed to create window." << std::endl;