Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
tonic::DartClassProvider Class Reference

#include <dart_class_provider.h>

Public Member Functions

 DartClassProvider (DartState *dart_state, const char *library_name)
 
 ~DartClassProvider ()
 
Dart_Handle GetClassByName (const char *class_name)
 

Detailed Description

Definition at line 14 of file dart_class_provider.h.

Constructor & Destructor Documentation

◆ DartClassProvider()

tonic::DartClassProvider::DartClassProvider ( DartState dart_state,
const char *  library_name 
)

Definition at line 13 of file dart_class_provider.cc.

14 {
15 library_.Set(dart_state, Dart_LookupLibrary(ToDart(class_name)));
16}
void Set(DartState *dart_state, Dart_Handle value)
DART_EXPORT Dart_Handle Dart_LookupLibrary(Dart_Handle url)
const char *const class_name
Dart_Handle ToDart(const T &object)

◆ ~DartClassProvider()

tonic::DartClassProvider::~DartClassProvider ( )

Definition at line 18 of file dart_class_provider.cc.

18{}

Member Function Documentation

◆ GetClassByName()

Dart_Handle tonic::DartClassProvider::GetClassByName ( const char *  class_name)

Definition at line 20 of file dart_class_provider.cc.

20 {
21 Dart_Handle name_handle = ToDart(class_name);
22 Dart_Handle class_handle =
23 Dart_GetNonNullableType(library_.value(), name_handle, 0, nullptr);
24 TONIC_DCHECK(!Dart_IsError(class_handle));
25 return class_handle;
26}
Dart_PersistentHandle value() const
DART_EXPORT Dart_Handle Dart_GetNonNullableType(Dart_Handle library, Dart_Handle class_name, intptr_t number_of_type_arguments, Dart_Handle *type_arguments)
struct _Dart_Handle * Dart_Handle
Definition: dart_api.h:258
DART_EXPORT bool Dart_IsError(Dart_Handle handle)
#define TONIC_DCHECK
Definition: macros.h:32

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