Flutter Engine
FlutterCallbackCache Class Reference

#import <FlutterCallbackCache.h>

Inheritance diagram for FlutterCallbackCache:

Class Methods

(FlutterCallbackInformation *) + lookupCallbackInformation:
(void) + setCachePath: [implementation]

Detailed Description

The cache containing callback information for spawning a FlutterHeadlessDartRunner.

Definition at line 37 of file FlutterCallbackCache.h.

Method Documentation

◆ lookupCallbackInformation:()

+ (FlutterCallbackInformation *) lookupCallbackInformation: (int64_t)  handle

Returns the callback information for the given callback handle. This callback information can be used when spawning a FlutterHeadlessDartRunner.

handleThe handle for a callback, provided by the Dart method PluginUtilities.getCallbackHandle.
A FlutterCallbackInformation object which contains the name of the callback, the name of the class in which the callback is defined, and the path of the library which contains the callback. If the provided handle is invalid, nil is returned.

Definition at line 14 of file FlutterCallbackCache.mm.

References FlutterCallbackInformation::callbackClassName, FlutterCallbackInformation::callbackLibraryPath, FlutterCallbackInformation::callbackName, error, flutter::DartCallbackCache::GetCallbackInformation(), flutter::path, and flutter::DartCallbackCache::SetCachePath().

14  :(int64_t)handle {
16  if (info == nullptr) {
17  return nil;
18  }
19  FlutterCallbackInformation* new_info = [[[FlutterCallbackInformation alloc] init] autorelease];
20  new_info.callbackName = [NSString stringWithUTF8String:info->name.c_str()];
21  new_info.callbackClassName = [NSString stringWithUTF8String:info->class_name.c_str()];
22  new_info.callbackLibraryPath = [NSString stringWithUTF8String:info->library_path.c_str()];
23  return new_info;
24 }
static std::unique_ptr< DartCallbackRepresentation > GetCallbackInformation(int64_t handle)

◆ setCachePath:()

+ (void) setCachePath: (NSString *)  path

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