Flutter Engine
The Flutter Engine
Static Public Member Functions | List of all members
flutter::DartUI Class Reference

#include <dart_ui.h>

Static Public Member Functions

static void InitForIsolate (const Settings &settings)
 

Detailed Description

Definition at line 13 of file dart_ui.h.

Member Function Documentation

◆ InitForIsolate()

void flutter::DartUI::InitForIsolate ( const Settings settings)
static

Definition at line 364 of file dart_ui.cc.

364 {
365 std::call_once(g_dispatchers_init_flag, InitDispatcherMap);
366
367 auto dart_ui = Dart_LookupLibrary(ToDart("dart:ui"));
368 if (Dart_IsError(dart_ui)) {
369 Dart_PropagateError(dart_ui);
370 }
371
372 // Set up FFI Native resolver for dart:ui.
374 Dart_SetFfiNativeResolver(dart_ui, ResolveFfiNativeFunction);
375 if (Dart_IsError(result)) {
377 }
378
379 if (settings.enable_impeller) {
380 result = Dart_SetField(dart_ui, ToDart("_impellerEnabled"), Dart_True());
381 if (Dart_IsError(result)) {
383 }
384 }
385
386 if (settings.enable_platform_isolates) {
387 result =
388 Dart_SetField(dart_ui, ToDart("_platformIsolatesEnabled"), Dart_True());
389 if (Dart_IsError(result)) {
391 }
392 }
393
394 result = Dart_SetField(dart_ui, ToDart("_implicitViewId"),
396 if (Dart_IsError(result)) {
398 }
399}
DART_EXPORT Dart_Handle Dart_SetFfiNativeResolver(Dart_Handle library, Dart_FfiNativeResolver resolver)
struct _Dart_Handle * Dart_Handle
Definition: dart_api.h:258
DART_EXPORT void Dart_PropagateError(Dart_Handle handle)
DART_EXPORT Dart_Handle Dart_True(void)
DART_EXPORT Dart_Handle Dart_LookupLibrary(Dart_Handle url)
DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle Dart_SetField(Dart_Handle container, Dart_Handle name, Dart_Handle value)
DART_EXPORT Dart_Handle Dart_NewInteger(int64_t value)
DART_EXPORT bool Dart_IsError(Dart_Handle handle)
GAsyncResult * result
constexpr int64_t kFlutterImplicitViewId
Definition: constants.h:35
Dart_Handle ToDart(const T &object)

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