kraken
library
Functions
allocateNewPage ([int targetContextId = -1 ])
→ int
castToType <T > (dynamic value )
→ T
clearUICommand (int contextId )
→ void
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 , )
→ 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 , )
→ 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()