kraken library

Classes

AssetsBundle
AsyncStorageModule
BaseModule
BindingBridge
BindingContext
BindingObject
ClipBoardModule
ConnectionModule
DataBundle
DevToolsService
FetchModule
FileBundle
The bundle that source from local io.
HistoryItem
HistoryModule
HttpCacheController
HttpCacheObject
HttpCacheObjectBlob
HttpClientCachedResponse
The HttpClientResponse that hits http cache.
HttpClientInterceptor
HttpClientStreamResponse
Kraken
KrakenBundle
KrakenController
KrakenDynamicLibrary
KrakenElementToFlutterElementAdaptor
KrakenElementToWidgetAdaptor
KrakenHttpOverrides
KrakenInfo
KrakenJavaScriptChannel
KrakenMethodChannel
KrakenModuleController
KrakenNativeChannel
KrakenNavigationAction
KrakenNavigationDelegate
KrakenRenderObjectToWidgetAdapter<T extends RenderObject>
KrakenRenderObjectToWidgetElement<T extends RenderObject>
KrakenRenderObjectWidget
KrakenTextControl
KrakenViewController
LocationModule
MethodChannelModule
ModuleManager
NativeBindingObject
NativeBoundingClientRect
NativeCanvasRenderingContext2D
NativeKrakenInfo
NativePerformanceEntry
NativePerformanceEntryList
NativeString
NativeTouch
NativeValue
NetworkBundle
PausablePeriodicTimer
A Timer that can be paused, resumed.
PerformanceEntry
PerformanceTiming
ProxyHttpClient
ProxyHttpClientRequest
RawNativeCloseEvent
RawNativeCustomEvent
RawNativeEvent
RawNativeGestureEvent
RawNativeInputEvent
RawNativeIntersectionChangeEvent
RawNativeMediaErrorEvent
RawNativeMessageEvent
RawNativeMouseEvent
RawNativeTouchEvent
UICommand
UICommandItem
UriParser
WidgetDelegate
Delegate methods of widget
WidgetElement

Properties

EMPTY_STRING String
getter/setter pair
isEnabledLog bool
final
kKrakenJSPagePoolSize int
The maximum kraken pages running in the same times. Can be upgrade to larger amount if you have enough memory spaces.
getter/setter pair
PERF_ADD_EVENT_END String
final
PERF_ADD_EVENT_START String
final
PERF_BRIDGE_INIT_END String
final
PERF_BRIDGE_INIT_START String
final
PERF_BRIDGE_REGISTER_DART_METHOD_END String
final
PERF_BRIDGE_REGISTER_DART_METHOD_START String
final
PERF_CONTROLLER_INIT_END String
final
PERF_CONTROLLER_INIT_START String
final
PERF_CONTROLLER_PROPERTY_INIT String
final
PERF_CREATE_COMMENT_END String
final
PERF_CREATE_COMMENT_START String
final
PERF_CREATE_DOCUMENT_FRAGMENT_END String
final
PERF_CREATE_DOCUMENT_FRAGMENT_START String
final
PERF_CREATE_ELEMENT_END String
final
PERF_CREATE_ELEMENT_START String
final
PERF_CREATE_TEXT_NODE_END String
final
PERF_CREATE_TEXT_NODE_START String
final
PERF_CREATE_VIEWPORT_END String
final
PERF_CREATE_VIEWPORT_START String
final
PERF_DISPOSE_EVENT_TARGET_END String
final
PERF_DISPOSE_EVENT_TARGET_START String
final
PERF_DOM_FLUSH_UI_COMMAND_END String
final
PERF_DOM_FLUSH_UI_COMMAND_START String
final
PERF_DOM_FORCE_LAYOUT_END String
final
PERF_DOM_FORCE_LAYOUT_START String
final
PERF_ELEMENT_MANAGER_INIT_END String
final
PERF_ELEMENT_MANAGER_INIT_START String
final
PERF_ELEMENT_MANAGER_PROPERTY_INIT String
final
PERF_FLEX_LAYOUT_END String
final
PERF_FLEX_LAYOUT_START String
final
PERF_FLOW_LAYOUT_END String
final
PERF_FLOW_LAYOUT_START String
final
PERF_FLUSH_UI_COMMAND_END String
final
PERF_FLUSH_UI_COMMAND_START String
final
PERF_INSERT_ADJACENT_NODE_END String
final
PERF_INSERT_ADJACENT_NODE_START String
final
PERF_INTRINSIC_LAYOUT_END String
final
PERF_INTRINSIC_LAYOUT_START String
final
PERF_JS_BUNDLE_EVAL_END String
final
PERF_JS_BUNDLE_EVAL_START String
final
PERF_JS_BUNDLE_LOAD_END String
final
PERF_JS_BUNDLE_LOAD_START String
final
PERF_PAINT_END String
final
PERF_PAINT_START String
final
PERF_REMOVE_EVENT_END String
final
PERF_REMOVE_EVENT_START String
final
PERF_REMOVE_NODE_END String
final
PERF_REMOVE_NODE_START String
final
PERF_REMOVE_PROPERTIES_END String
final
PERF_REMOVE_PROPERTIES_START String
final
PERF_ROOT_ELEMENT_INIT_END String
final
PERF_ROOT_ELEMENT_INIT_START String
final
PERF_ROOT_ELEMENT_PROPERTY_INIT String
final
PERF_SET_PROPERTIES_END String
final
PERF_SET_PROPERTIES_START String
final
PERF_SET_RENDER_STYLE_END String
final
PERF_SET_RENDER_STYLE_START String
final
PERF_SET_STYLE_END String
final
PERF_SET_STYLE_START String
final
PERF_SILVER_LAYOUT_END String
final
PERF_SILVER_LAYOUT_START String
final
PERF_VIEW_CONTROLLER_INIT_END String
final
PERF_VIEW_CONTROLLER_INIT_START String
final
PERF_VIEW_CONTROLLER_PROPERTY_INIT String
final
PERFORMANCE_NONE_UNIQUE_ID int
final

Functions

allocateNewPage([int targetContextId = -1]) int
castToType<T>(dynamic value) → T
clearUICommand(int contextId) → void
createHttpHeaders({Map<String, List<String>>? initialHeaders}) HttpHeaders
createScreen(double width, double height) Pointer<Void>
defaultDecisionHandler(KrakenNavigationAction action) Future<KrakenNavigationActionPolicy>
dispatchUITask(int contextId, Pointer<Void> context, Pointer<Void> callback) → void
disposePage(int contextId) → void
doubleToUint64(double value) int
emitModuleEvent(int contextId, String moduleName, Event? event, String extra) → void
emitUIEvent(int contextId, Pointer<NativeBindingObject> nativeBindingObject, Event event) → void
evaluateQuickjsByteCode(int contextId, Uint8List bytes) → void
evaluateScripts(int contextId, String code, {String? url, int line = 0}) → void
flushUICommand() → void
flushUICommandCallback() → void
freeNativeString(Pointer<NativeString> pointer) → void
fromNativeValue(Pointer<NativeValue> nativeValue) → dynamic
getAnonymousNativeFunctionFromId(int id) AnonymousNativeFunction?
getAsyncAnonymousNativeFunctionFromId(int id) AsyncAnonymousNativeFunction?
getBundlePathFromEnv() String?
getBundleURLFromEnv() String?
getEntrypointUri(int? contextId) Uri
getKrakenInfo() KrakenInfo
getKrakenMethodChannel() MethodChannel
getKrakenTemporaryPath() Future<String>
getOrigin(Uri uri) String
initBridge() int
Init bridge
initJSPagePool(int poolSize) → void
invokeModule(Pointer<Void> callbackContext, int contextId, String moduleName, String method, String? params, DartAsyncModuleCallback callback) String
invokeModuleEvent(int contextId, String moduleName, Event? event, String extra) → void
launch({KrakenBundle? bundle, bool? debugEnableInspector, Color background = _white, DevToolsService? devToolsService, HttpClientInterceptor? httpClientInterceptor, bool? showPerformanceOverlay = false}) → void
nativeStringToString(Pointer<NativeString> pointer) String
parseHTML(int contextId, String code) → void
profileModeEnabled() bool
readNativeUICommandToDart(Pointer<Uint64> nativeCommandItems, int commandLength, int contextId) List<UICommand>
registerDartMethodsToCpp() → void
registerPluginByteCode(Uint8List bytecode, String name) → void
reloadJSContext(int contextId) Future<void>
removeAnonymousNativeFunctionFromId(int id) → void
removeAsyncAnonymousNativeFunctionFromId(int id) → void
resolveStringFromData(List<int> data, {Codec codec = utf8}) FutureOr<String>
setJSMethodCallCallback(KrakenController controller) → void
setTargetPlatformForDesktop() → void
If the current platform is a desktop platform that isn't yet supported by TargetPlatform, override the default platform to one that is. Otherwise, do nothing. No need to handle macOS, as it has now been added to TargetPlatform.
setupHttpOverrides(HttpClientInterceptor? httpClientInterceptor, {required int contextId}) KrakenHttpOverrides
stringToNativeString(String string) Pointer<NativeString>
toNativeValue(Pointer<NativeValue> target, dynamic value) → void
traverseElement(Element element, TraverseElementCallback callback) → void
tryParseHttpDate(String input) DateTime?
uint16ToString(Pointer<Uint16> pointer, int length) String
uInt64ToDouble(int value) double

Typedefs

AnonymousNativeFunction = dynamic Function(List args)
AsyncAnonymousNativeFunction = Future Function(List args)
BindingObjectOperation = void Function(BindingObject bindingObject)
ConnectedCallback = void Function()
DartAllocateNewPage = int Function(int)
DartAsyncAnonymousFunctionCallback = void Function(Pointer<Void> callbackContext, Pointer<NativeValue> nativeValue, int contextId, Pointer<Utf8> errmsg)
DartAsyncBlobCallback = void Function(Pointer<Void> callbackContext, int contextId, Pointer<Utf8>, Pointer<Uint8>, int)
DartAsyncCallback = void Function(Pointer<Void> callbackContext, int contextId, Pointer<Utf8> errmsg)
DartAsyncModuleCallback = void Function(Pointer<Void> callbackContext, int contextId, Pointer<Utf8> errmsg, Pointer<NativeString> json)
DartClearUICommandItems = void Function(int contextId)
DartCreateScreen = Pointer<Void> Function(double, double)
DartDispatchEvent = int Function(int contextId, Pointer<NativeBindingObject> nativeBindingObject, Pointer<NativeString> eventType, Pointer<Void> nativeEvent, int isCustomEvent)
DartDispatchUITask = void Function(int contextId, Pointer<Void> context, Pointer<Void> callback)
DartDisposePage = void Function(int contextId)
DartEvaluateQuickjsByteCode = void Function(int contextId, Pointer<Uint8> bytes, int byteLen)
DartEvaluateScripts = void Function(int contextId, Pointer<NativeString> code, Pointer<Utf8> url, int startLine)
DartFlushUICommand = void Function()
DartFlushUICommandCallback = void Function()
DartGetKrakenInfo = Pointer<NativeKrakenInfo> Function()
DartGetUICommandItems = Pointer<Uint64> Function(int contextId)
DartGetUICommandItemSize = int Function(int contextId)
DartInitDocument = void Function(int contextId, Pointer<NativeBindingObject> nativePtr)
DartInitJSPagePool = void Function(int poolSize)
DartInitWindow = void Function(int contextId, Pointer<NativeBindingObject> nativePtr)
DartInvokeEventListener = void Function(int contextId, Pointer<NativeString>, Pointer<Utf8> eventType, Pointer<Void> nativeEvent, Pointer<NativeString>)
DartParseHTML = void Function(int contextId, Pointer<Utf8> code, int length)
DartPerformanceGetEntries = Pointer<NativePerformanceEntryList> Function(int contextId)
DartProfileModeEnabled = int Function()
DartRAFAsyncCallback = void Function(Pointer<Void>, int contextId, double data, Pointer<Utf8> errmsg)
DartRegisterDartMethods = void Function(Pointer<Uint64> methodBytes, int length)
DartRegisterPluginByteCode = void Function(Pointer<Uint8> bytes, int length, Pointer<Utf8> pluginName)
DartReloadJSContext = void Function(int contextId)
DoubleCallback = void Function(double)
GetContext = BuildContext Function()
Get context of current widget.
GetCursorColor = Color Function()
Get the cursor color according to the widget theme and platform theme.
GetCursorRadius = Radius Function()
Get the cursor radius according to the target platform.
GetSelectionColor = Color Function()
Get the selection color according to the widget theme and platform theme.
GetTargetPlatform = TargetPlatform Function()
Get the target platform.
GetTextSelectionControls = TextSelectionControls Function()
Get the text selection controls according to the target platform.
InvokeModuleCallback = void Function({Object? data, String? error})
JSErrorHandler = void Function(String message)
KrakenNavigationDecisionHandler = Future<KrakenNavigationActionPolicy> Function(KrakenNavigationAction action)
KrakenNavigationErrorHandler = void Function(Object error, Object stack)
LoadErrorHandler = void Function(FlutterError error, StackTrace stack)
LoadHandler = void Function(KrakenController controller)
MethodCallCallback = Future Function(String method, Object? arguments)
ModuleCreator = BaseModule Function(ModuleManager? moduleManager)
NativeAllocateNewPage = Int32 Function(Int32)
NativeAsyncAnonymousFunctionCallback = Void Function(Pointer<Void> callbackContext, Pointer<NativeValue> nativeValue, Int32 contextId, Pointer<Utf8> errmsg)
NativeAsyncBlobCallback = Void Function(Pointer<Void> callbackContext, Int32 contextId, Pointer<Utf8>, Pointer<Uint8>, Int32)
NativeAsyncCallback = Void Function(Pointer<Void> callbackContext, Int32 contextId, Pointer<Utf8> errmsg)
NativeAsyncModuleCallback = Void Function(Pointer<Void> callbackContext, Int32 contextId, Pointer<Utf8> errmsg, Pointer<NativeString> json)
NativeCancelAnimationFrame = Void Function(Int32 contextId, Int32 id)
NativeClearTimeout = Void Function(Int32 contextId, Int32)
NativeClearUICommandItems = Void Function(Int32 contextId)
NativeCreateScreen = Pointer<Void> Function(Double, Double)
NativeDispatchEvent = Int32 Function(Int32 contextId, Pointer<NativeBindingObject> nativeBindingObject, Pointer<NativeString> eventType, Pointer<Void> nativeEvent, Int32 isCustomEvent)
NativeDispatchUITask = Void Function(Int32 contextId, Pointer<Void> context, Pointer<Void> callback)
NativeDisposePage = Void Function(Int32 contextId)
NativeEvaluateQuickjsByteCode = Void Function(Int32 contextId, Pointer<Uint8> bytes, Int32 byteLen)
NativeEvaluateScripts = Void Function(Int32 contextId, Pointer<NativeString> code, Pointer<Utf8> url, Int32 startLine)
NativeFlushUICommand = Void Function()
NativeFlushUICommandCallback = Void Function()
NativeGetKrakenInfo = Pointer<NativeKrakenInfo> Function()
NativeGetScreen = Pointer<Void> Function()
NativeGetUICommandItems = Pointer<Uint64> Function(Int32 contextId)
NativeGetUICommandItemSize = Int64 Function(Int64 contextId)
NativeInitDocument = Void Function(Int32 contextId, Pointer<NativeBindingObject> nativePtr)
NativeInitJSPagePool = Void Function(Int32 poolSize)
NativeInitWindow = Void Function(Int32 contextId, Pointer<NativeBindingObject> nativePtr)
NativeInvokeBindingMethod = Void Function(Pointer<Void> nativePtr, Pointer<NativeValue> returnValue, Pointer<NativeString> method, Int32 argc, Pointer<NativeValue> argv)
NativeInvokeEventListener = Void Function(Int32 contextId, Pointer<NativeString>, Pointer<Utf8> eventType, Pointer<Void> nativeEvent, Pointer<NativeString>)
NativeInvokeModule = Pointer<NativeString> Function(Pointer<Void> callbackContext, Int32 contextId, Pointer<NativeString> module, Pointer<NativeString> method, Pointer<NativeString> params, Pointer<NativeFunction<NativeAsyncModuleCallback>>)
NativeJSError = Void Function(Int32 contextId, Pointer<Utf8>)
NativeParseHTML = Void Function(Int32 contextId, Pointer<Utf8> code, Int32 length)
NativePerformanceGetEntries = Pointer<NativePerformanceEntryList> Function(Int32 contextId)
NativeProfileModeEnabled = Int32 Function()
NativeRAFAsyncCallback = Void Function(Pointer<Void> callbackContext, Int32 contextId, Double data, Pointer<Utf8> errmsg)
NativeRegisterDartMethods = Void Function(Pointer<Uint64> methodBytes, Int32 length)
NativeRegisterPluginByteCode = Void Function(Pointer<Uint8> bytes, Int32 length, Pointer<Utf8> pluginName)
NativeReloadApp = Void Function(Int32 contextId)
NativeReloadJSContext = Void Function(Int32 contextId)
NativeRequestAnimationFrame = Int32 Function(Pointer<Void> callbackContext, Int32 contextId, Pointer<NativeFunction<NativeRAFAsyncCallback>>)
NativeRequestBatchUpdate = Void Function(Int32 contextId)
NativeSetInterval = Int32 Function(Pointer<Void> callbackContext, Int32 contextId, Pointer<NativeFunction<NativeAsyncCallback>>, Int32)
NativeSetTimeout = Int32 Function(Pointer<Void> callbackContext, Int32 contextId, Pointer<NativeFunction<NativeAsyncCallback>>, Int32)
NativeToBlob = Void Function(Pointer<Void> callbackContext, Int32 contextId, Pointer<NativeFunction<NativeAsyncBlobCallback>>, Int32, Double)
NewModuleCreator = BaseModule Function(ModuleManager)
OnConnectivityChangedCallback = void Function(Map json)
OnControllerCreated = void Function(KrakenController controller)
PendingCallback = void Function()
RequestFocus = void Function()
Request focus of current widget.
TraverseElementCallback = void Function(Element element)
VoidCallback = void Function()