Flutter Engine
The Flutter Engine
Static Public Member Functions | List of all members
tonic::DartConverterWrappable Struct Reference

#include <dart_wrappable.h>

Static Public Member Functions

static DartWrappableFromDart (Dart_Handle handle)
 
static DartWrappableFromArguments (Dart_NativeArguments args, int index, Dart_Handle &exception)
 

Detailed Description

Definition at line 84 of file dart_wrappable.h.

Member Function Documentation

◆ FromArguments()

DartWrappable * tonic::DartConverterWrappable::FromArguments ( Dart_NativeArguments  args,
int  index,
Dart_Handle exception 
)
static

Definition at line 99 of file dart_wrappable.cc.

101 {
102 intptr_t native_fields[DartWrappable::kNumberOfNativeFields];
104 args, index, DartWrappable::kNumberOfNativeFields, native_fields);
105 if (Dart_IsError(result)) {
107 return nullptr;
108 }
109 if (!native_fields[DartWrappable::kPeerIndex])
110 return nullptr;
111 return reinterpret_cast<DartWrappable*>(
112 native_fields[DartWrappable::kPeerIndex]);
113}
struct _Dart_Handle * Dart_Handle
Definition: dart_api.h:258
DART_EXPORT Dart_Handle Dart_NewStringFromCString(const char *str)
DART_EXPORT Dart_Handle Dart_GetNativeFieldsOfArgument(Dart_NativeArguments args, int arg_index, int num_fields, intptr_t *field_values)
DART_EXPORT bool Dart_IsError(Dart_Handle handle)
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
GAsyncResult * result
const char kInvalidArgument[]
Definition: dart_error.cc:14

◆ FromDart()

DartWrappable * tonic::DartConverterWrappable::FromDart ( Dart_Handle  handle)
static

Definition at line 87 of file dart_wrappable.cc.

87 {
88 if (Dart_IsNull(handle)) {
89 return nullptr;
90 }
91 intptr_t peer = 0;
95 return nullptr;
96 return reinterpret_cast<DartWrappable*>(peer);
97}
DART_EXPORT Dart_Handle Dart_GetNativeInstanceField(Dart_Handle obj, int index, intptr_t *value)
DART_EXPORT bool Dart_IsNull(Dart_Handle object)

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