| Flutter iOS Embedder |

Class Methods | List of all members
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`.

Parameters

  handle | The handle for a callback, provided by the Dart method `PluginUtilities.getCallbackHandle`.

Returns
  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 17 of file FlutterCallbackCache.mm.

17 :(int64_t)handle {
18 auto info = flutter::DartCallbackCache::GetCallbackInformation(handle);
19 if (info == nullptr) {
20 return nil;
21 }
22 FlutterCallbackInformation* new_info = [[FlutterCallbackInformation alloc] init];
23 new_info.callbackName = [NSString stringWithUTF8String:info->name.c_str()];
24 new_info.callbackClassName = [NSString stringWithUTF8String:info->class_name.c_str()];
25 new_info.callbackLibraryPath = [NSString stringWithUTF8String:info->library_path.c_str()];
26 return new_info;
27 }

References FlutterCallbackInformation::callbackClassName, FlutterCallbackInformation::callbackLibraryPath, and FlutterCallbackInformation::callbackName.

## ◆ setCachePath:

+ (void) setCachePath: |  | (NSString *) | path |
| implementation

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

- shell/platform/darwin/ios/framework/Headers/FlutterCallbackCache.h
- shell/platform/darwin/ios/framework/Source/FlutterCallbackCache.mm

FlutterCallbackInformation::callbackLibraryPath
NSString * callbackLibraryPath
Definition: FlutterCallbackCache.h:29
FlutterCallbackInformation::callbackName
NSString * callbackName
Definition: FlutterCallbackCache.h:21
FlutterCallbackInformation::callbackClassName
NSString * callbackClassName
Definition: FlutterCallbackCache.h:25
FlutterCallbackInformation
Definition: FlutterCallbackCache.h:17