20 {
21 Dart_Handle ui_lib = Dart_LookupLibrary(
ToDart(
"dart:ui"));
22 Dart_Handle dart_validate_args[1];
23 dart_validate_args[0] =
ToDart(may_insecurely_connect_to_all_domains);
24 Dart_Handle http_connection_hook_closure =
25 Dart_Invoke(ui_lib,
ToDart(
"_getHttpConnectionHookClosure"),
26 1, dart_validate_args);
28
29 Dart_Handle locale_closure =
30 Dart_Invoke(ui_lib,
ToDart(
"_getLocaleClosure"), 0,
nullptr);
32
33 Dart_Handle setup_result = dart::bin::SetupDartIoLibrary({
34 .http_connection_hook = http_connection_hook_closure,
35 .locale_name_callback = locale_closure,
36 .script_uri = !script_uri.empty() ? script_uri.c_str() : nullptr,
37 });
39}
#define FML_CHECK(condition)
Dart_Handle ToDart(const T &object)
bool CheckAndHandleError(Dart_Handle handle)